Support AT_HWCAP2 on FreeBSD.
[external/binutils.git] / gdb / ChangeLog
1 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
2
3         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
4
5 2018-10-26  Jim Wilson  <jimw@sifive.com>
6
7         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
8         (riscv_linux_sigframe_init): Declare.
9         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
10         (riscv_linux_sigframe): New.
11         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
12         (riscv_linux_sigframe_init): Define.
13         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
14
15         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
16         (riscv_isa_flen): Likewise.  Drop static.
17         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
18         (riscv_isa_flen): Likewise.  Declare.
19
20 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
21             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
22
23         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
24         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
25         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
26         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
27         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
28         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
29         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
30         Define.
31         (struct ppc_linux_features) <htm>: New field.
32         (ppc_linux_no_features): Add initializer for htm field.
33         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
34         new tdescs.
35         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
36         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
37         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
38         Define if not already defined.
39         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
40         and rs6000/powerpc-isa207-htm-vsx64l.
41         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
42         rs6000/powerpc-isa207-htm-vsx64l.xml.
43         * features/rs6000/power-htm-spr.xml: New file.
44         * features/rs6000/power-htm-core.xml: New file.
45         * features/rs6000/power64-htm-core.xml: New file.
46         * features/rs6000/power-htm-fpu.xml: New file.
47         * features/rs6000/power-htm-altivec.xml: New file.
48         * features/rs6000/power-htm-vsx.xml: New file.
49         * features/rs6000/power-htm-ppr.xml: New file.
50         * features/rs6000/power-htm-dscr.xml: New file.
51         * features/rs6000/power-htm-tar.xml: New file.
52         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
53         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
54         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
55         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
56         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
57         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
58         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
59         fetch_regset with HTM regsets.
60         (store_register, store_ppc_registers): Call store_regset with HTM
61         regsets.
62         (ppc_linux_nat_target::read_description): Set htm field in the
63         features struct if needed.
64         * ppc-linux-tdep.c: Include
65         features/rs6000/powerpc-isa207-htm-vsx32l.c and
66         features/rs6000/powerpc-isa207-htm-vsx64l.c.
67         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
68         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
69         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
70         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
71         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
72         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
73         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
74         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
75         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
76         (ppc32_linux_ctarregset): New globals.
77         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
78         (ppc_linux_collect_core_cpgrregset): New function.
79         (ppc_linux_iterate_over_regset_sections): Call back with the htm
80         regsets.
81         (ppc_linux_core_read_description): Check if the tm spr section is
82         present and set htm in the features struct.
83         (_initialize_ppc_linux_tdep): Call
84         initialize_tdesc_powerpc_isa207_htm_vsx32l and
85         initialize_tdesc_powerpc_isa207_htm_vsx64l.
86         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
87         Declare.
88         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
89         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
90         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
91         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
92         New fields.
93         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
94         Likewise.
95         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
96         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
97         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
98         New enum fields.
99         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
100         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
101         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
102         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
103         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
104         <PPC_CTAR_REGNUM>: Likewise.
105         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
106         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
107         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
108         (IS_CEFP_PSEUDOREG): Define.
109         (rs6000_register_name): Hide the upper halves of checkpointed VSX
110         registers.  Return names for the checkpointed DFP, VSX, and EFP
111         pseudo registers.
112         (rs6000_pseudo_register_type): Remove initial assert and raise an
113         internal error in the else clause instead.  Return types for the
114         checkpointed DFP, VSX, and EFP pseudo registers.
115         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
116         checkpointed DFP pseudo registers.
117         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
118         checkpointed VSX pseudo registers.
119         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
120         from efpr_pseudo_register_read and
121         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
122         registers.
123         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
124         Handle checkpointed DFP, VSX, and EFP registers.
125         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
126         (efp_ax_pseudo_register_collect): New functions.
127         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
128         register logic to new functions.  Handle checkpointed DFP, VSX,
129         and EFP pseudo registers.
130         (rs6000_gdbarch_init): Look for and validate the htm features.
131         Include checkpointed DFP, VSX and EFP pseudo-registers.
132         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
133         HTM registers.
134
135 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
136
137         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
138         without altivec or fpu.
139
140 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
141             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
142
143         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
144         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
145         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
146         Define if not already defined.
147         * features/rs6000/power-ebb.xml: New file.
148         * features/rs6000/power-linux-pmu.xml: New file.
149         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
150         features.
151         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
152         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
153         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
154         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
155         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
156         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
157         fetch_regset with ebb and pmu regsets.
158         (store_register, store_ppc_registers): Call store_regset with ebb
159         and pmu regsets.
160         (ppc_linux_nat_target::read_description): Set isa207 field in the
161         features struct if ebb and pmu are avaiable.
162         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
163         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
164         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
165         and pmu regsets.
166         (ppc_linux_core_read_description): Check if the pmu section is
167         present and set isa207 in the features struct.
168         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
169         (ppc32_linux_pmuregset): Declare.
170         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
171         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
172         <ppc_sier_regnum>: New field.
173         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
174         New enum values.
175         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
176         values.
177         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
178         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
179         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
180         ebb and pmu features.
181
182 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
183             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
184
185         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
186         (tdesc_powerpc_isa207_vsx64l): Declare.
187         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
188         (struct ppc_linux_features) <isa207>: New field.
189         (ppc_linux_no_features): Add initializer for isa207 field.
190         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
191         new tdescs.
192         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
193         (NT_PPC_TAR): Define if not already defined.
194         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
195         rs6000/powerpc-isa207-vsx64l.
196         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
197         rs6000/powerpc-isa207-vsx64l.xml.
198         * features/rs6000/power-tar.xml: New file.
199         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
200         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
201         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
202         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
203         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
204         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
205         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
206         fetch_regset with the TAR regset.
207         (store_register, store_ppc_registers): Call store_regset with the
208         TAR regset.
209         (ppc_linux_nat_target::read_description): Set isa207 field in the
210         features struct if needed.
211         * ppc-linux-tdep.c: Include
212         features/rs6000/powerpc-isa207-vsx32l.c and
213         features/rs6000/powerpc-isa207-vsx64l.c.
214         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
215         (ppc_linux_iterate_over_regset_sections): Call back with the tar
216         regset.
217         (ppc_linux_core_read_description): Check if the tar section is
218         present and set isa207 in the features struct.
219         (_initialize_ppc_linux_tdep): Call
220         initialize_tdesc_powerpc_isa207_vsx32l and
221         initialize_tdesc_powerpc_isa207_vsx64l.
222         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
223         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
224         (enum) <PPC_TAR_REGNUM>: New enum value.
225         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
226         feature.
227         (ppc_process_record_op31): Record changes to TAR.
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_isa205_ppr_dscr_vsx32l)
233         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
234         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
235         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
236         (struct ppc_linux_features) <ppr_dscr>: New field.
237         (ppc_linux_no_features): Add initializer for ppr_dscr field.
238         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
239         new tdescs.
240         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
241         Define if not already defined.
242         * features/Makefile (WHICH): Add
243         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
244         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
245         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
246         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
247         * features/rs6000/power-dscr.xml: New file.
248         * features/rs6000/power-ppr.xml: New file.
249         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
250         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
251         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
252         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
253         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
254         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
255         * ppc-linux-nat.c: Include <sys/uio.h>.
256         (fetch_regset, store_regset, check_regset): New functions.
257         (fetch_register, fetch_ppc_registers): Call fetch_regset with
258         DSCR and PPR regsets.
259         (store_register, store_ppc_registers): Call store_regset with
260         DSCR and PPR regsets.
261         (ppc_linux_get_hwcap2): New function.
262         (ppc_linux_nat_target::read_description): Call
263         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
264         features struct if needed.
265         * ppc-linux-tdep.c: Include
266         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
267         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
268         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
269         (ppc32_linux_dscrregset): New globals.
270         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
271         and dscr regsets.
272         (ppc_linux_core_read_description): Check if the ppr and dscr
273         sections are present and set ppr_dscr in the features struct.
274         (_initialize_ppc_linux_tdep): Call
275         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
276         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
277         * ppc-linux-tdep.h (ppc32_linux_pprregset)
278         (ppc32_linux_dscrregset): Declare.
279         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
280         <ppc_dscr_regnum>: New field.
281         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
282         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
283         and dscr features.
284         (ppc_process_record_op31): Record changes to PPR and DSCR.
285
286 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
287
288         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
289         second initializer line for the have_* variables.  Initialize
290         have_fpu to 0 instead of 1.
291
292 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
293
294         * arch/ppc-linux-common.c (ppc_linux_match_description):
295         Parenthesize tdesc assignements and indent them properly.
296
297 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
298
299         * ppc-linux-nat.c (fetch_register): Change if statement to else
300         if.
301         (store_register): Likewise.
302
303 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
304
305         * rs6000-tdep.c: Remove reggroups.h include.
306         (rs6000_pseudo_register_reggroup_p): Remove.
307         (rs6000_gdbarch_init): Remove call to
308         set_tdesc_pseudo_register_reggroup_p.
309
310 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
311
312         * reggroups.c (default_register_reggroup_p): Return true for
313         decfloat registers and float_reggroup.
314
315 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
316
317         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
318         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
319         ppc_linux_collect_vrregset by regcache_collect_regset.
320
321 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
322
323         * linux-tdep.c (linux_collect_regset_section_cb): Use
324         std::vector<gdb_byte> instead of char * and malloc for buf.
325         Remove xfree.
326
327 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
328
329         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
330         symtab_start instead of always using language_unknown.
331
332 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
333
334         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
335         READ_P parameter, catch and ignore register access errors from
336         either the old or new MISA location.
337         (riscv_has_feature): Update call to riscv_read_misa_reg.
338
339 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
340
341         * python/py-function.c (convert_values_to_python): Return
342         gdbpy_ref<>.  Add header comment.
343         (fnpy_call): Adjust.
344
345 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
346
347         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
348         (cmdpy_completer_handle_brkchars): Adjust.
349         (cmdpy_completer): Adjust.
350
351 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
352
353         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
354         Pass correct regnum to raw_supply_zeroed.
355
356 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
357
358         * regcache.c (cooked_read_test): Add CSKY to the list of
359         architectures with a save_reggroup
360
361 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
362
363         PR gdb/23368
364         * infrun.c (follow_exec): In the follow_exec_mode_new case,
365         transfer terminal state from old new new inferior.
366         * terminal.h (swap_terminal_info): New function.
367         * inflow.c (swap_terminal_info): New function.
368
369 2018-10-23  Tom Tromey  <tom@tromey.com>
370
371         * record-btrace.c (get_thread_current_frame_id): Rename from
372         get_thread_current_frame.  Return a frame_id.
373         (record_btrace_start_replaying): Update.
374
375 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
376
377         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
378         for CSRs.
379
380 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
381
382         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
383         have_nonsteppable_watchpoint attribute to 1.
384
385 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
386
387         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
388         register names.
389         (struct register_alias): Rename to...
390         (struct riscv_register_alias): ...this, and update comment.
391         (riscv_register_aliases): Update type, and alias names.  Remove
392         CSR names from this list.
393         (riscv_register_name): Use riscv_gdb_reg_names for int and float
394         register names.  Add an extra assertion.
395         (riscv_is_regnum_a_named_csr): New function.
396         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
397
398 2018-10-22  Jim Wilson  <jimw@sifive.com>
399
400         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
401         FP reg smaller than FP reg size, and fill with -1 instead of 0.
402
403         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
404         (riscv_register_type): Use them.
405         (riscv_print_one_register_info): Handle union of floats same as float.
406         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
407         riscv_fpreg_q_type fields.
408
409 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
410
411         * gdbarch.sh (gdbarch_num_cooked_regs): New.
412         * gdbarch.h: Re-generate.
413         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
414         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
415         * eval.c (evaluate_subexp_standard): Likewise.
416         * findvar.c (value_of_register): Likewise.
417         (value_of_register_lazy): Likewise.
418         (address_from_register): Likewise.
419         * frame.c (get_frame_register_bytes): Likewise.
420         * gdbarch-selftests.c (register_to_value_test): Likewise.
421         * h8300-tdep.c (h8300_register_type): Likewise.
422         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
423         (i386_svr4_reg_to_regnum): Likewise.
424         * infcmd.c (default_print_registers_info): Likewise.
425         (registers_info): Likewise.
426         (print_vector_info): Likewise.
427         (default_print_float_info): Likewise.
428         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
429         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
430         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
431         (mi_cmd_data_list_changed_registers): Likewise.
432         (mi_cmd_data_list_register_values): Likewise.
433         (mi_cmd_data_write_register_values): Likewise.
434         (mi_cmd_trace_frame_collected): Likewise.
435         * mips-tdep.c (print_gp_register_row): Likewise.
436         (mips_print_registers_info): Likewise.
437         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
438         * regcache.c (init_regcache_descr): Likewise.
439         (register_size): Likewise.
440         (register_dump::dump): Likewise.
441         (cooked_read_test): Likewise.
442         (cooked_write_test): Likewise.
443         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
444         (rs6000_gdbarch_init): Likewise.
445         * stabsread.c (stab_reg_to_regnum): Likewise.
446         * stack.c (info_frame_command): Likewise.
447         * target-descriptions.c (tdesc_register_name): Likewise.
448         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
449         * tui/tui-regs.c (tui_show_register_group): Likewise.
450         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
451         (user_reg_map_regnum_to_name): Likewise.
452         (value_of_user_reg): Likewise.
453         (maintenance_print_user_registers): Likewise.
454         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
455         (xtensa_register_name): Likewise.
456         (xtensa_register_type): Likewise.
457         (xtensa_reg_to_regnum): Likewise.
458         (xtensa_pseudo_register_read): Likewise.
459         (xtensa_pseudo_register_write): Likewise.
460
461 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
462
463         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
464         correctly-sized buffer with raw_read.
465         (amd64_pseudo_register_write): Use correctly-sized buffer for
466         raw_read/raw_write.
467
468 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
469
470         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
471         in add_prefix_cmd of set print type.
472
473 2018-10-19  Tom Tromey  <tom@tromey.com>
474
475         PR tui/18388:
476         * NEWS: Mention tabset deprecation.
477         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
478         (update_tab_width): New function.
479         (tui_set_tab_width, tui_show_tab_width): New functions.
480         (tui_set_tab_width_command): Use update_tab_width.
481         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
482         Add new "set tui tab-width" command.
483         * tui/tui-source.c (tui_set_source_content): Update.
484         * tui/tui-disasm.c (tui_set_disassem_content): Update.
485         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
486         Don't declare.
487         (tui_tab_width): Declare.
488         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
489         (tui_set_default_tab_len): Remove.
490
491 2018-10-19  Tom Tromey  <tom@tromey.com>
492
493         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
494         (key_is_backspace, tui_getc): Don't declare.
495         * tui/tui-io.c (key_is_start_sequence): Now static.
496         (key_is_end_sequence, key_is_backspace): Remove.
497         (tui_getc): Now static.
498
499 2018-10-19  Tom Tromey  <tom@tromey.com>
500
501         * symfile.c (reread_symbols): Clear "static_links".
502
503 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
504
505         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
506         define.
507         (aarch64_linux_sigframe_init): Extra boundary checks.
508
509 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
510
511         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
512         the possibly non-existent tdesc type 'vec128', but the type of raw
513         register v16 instead.
514
515 2018-10-19  Gary Benson <gbenson@redhat.com>
516
517         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
518
519 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
520
521         PR cli/23785
522         * cli/cli-dump.c (restore_binary_file): Check if "file" is
523         NULL.
524
525 2018-10-17  Paul Koning  <paul_koning@dell.com>
526
527         * charset.c (convert_between_encodings): Fix unsigned overflow.
528
529 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
530
531         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
532         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
533         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
534         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
535         New functions.
536         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
537         and fbsd_info_proc_mappings_header.
538         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
539         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
540         New.
541
542 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
543
544         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
545         Solaris Maintainer.
546
547 2018-10-15  Tom Tromey  <tom@tromey.com>
548
549         * tui/tui.c (strcat_to_buf): Remove casts.
550         * tui/tui-winsource.c (tui_show_source_line)
551         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
552         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
553         * tui/tui-windata.c (tui_first_data_item_displayed)
554         (tui_delete_data_content_windows, tui_erase_data_content)
555         (tui_display_all_data, tui_display_data_from)
556         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
557         * tui/tui-win.c (tui_set_win_height)
558         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
559         casts.
560         * tui/tui-win.c (tui_resize_all): Remove casts.
561         (tui_scroll_backward_command, tui_set_focus)
562         (tui_set_tab_width_command): Likewise.
563         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
564         * tui/tui-regs.c (tui_show_register_group): Remove cast.
565         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
566         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
567         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
568         Remove casts.
569
570 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
571
572         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
573         AArch64/ARM maintainer.
574
575 2018-10-11  Gary Benson <gbenson@redhat.com>
576
577         * interps.h (interp::m_name): Make private and mutable.
578         * interps.c (interp::~interp): Free m_name.
579
580 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
581             Simon Marchi <simark@simark.ca>
582
583         * README (`configure' options): Add documentation for new
584         "--enable-unit-tests" option.
585         * acinclude.m4: Include "selftest.m4".
586         * configure: Regenerate.
587         * configure.ac: Use "GDB_AC_SELFTEST".
588         * maint.c (maintenance_selftest): Update message informing
589         that selftests have been disabled.
590         (maintenance_info_selftests): Likewise.
591         * selftest.m4: New file.
592
593 2018-10-10  Gary Benson <gbenson@redhat.com>
594
595         * remote.c (remote_target::remote_send_printf): Add
596         missing va_end found by Coverity.
597
598 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
599
600         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
601
602 2018-10-09  Tom Tromey  <tom@tromey.com>
603
604         * configure: Rebuild.
605         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
606         * NEWS: Update --enable-ubsan documentation.
607
608 2018-10-09  Gary Benson <gbenson@redhat.com>
609
610         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
611         found by Coverity.
612
613 2018-10-08  Tom Tromey  <tom@tromey.com>
614
615         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
616         variable.
617         (riscv_fbsd_init_abi): Likewise.
618
619 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
620         * valops.c (value_struct_elt_for_reference): Rename local variable
621         to work around the shadowing a previous local warning.
622
623 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
624
625         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
626         * NEWS: Mention new FreeBSD/riscv native configuration.
627         * configure.host: Add riscv*-*-freebsd*.
628         * configure.nat: Likewise.
629         * riscv-fbsd-nat.c: New file.
630
631 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
632
633         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
634         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
635         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
636         * NEWS: Mention new FreeBSD/riscv target.
637         * configure.tgt: Add riscv*-*-freebsd*.
638         * riscv-fbsd-tdep.c: New file.
639         * riscv-fbsd-tdep.h: New file.
640
641 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
642
643         * regcache.h (struct regcache_map_entry): Note that this type can
644         be used with traditional frame caches.
645         * trad-frame.c (trad_frame_set_reg_regmap): New.
646         * trad-frame.h (trad_frame_set_reg_regmap): New.
647
648 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
649
650         PR c++/16841
651         * valops.c (get_virtual_base_offset): New function.
652         (value_struct_elt_for_reference): Use it to get virtual base offset
653         and add it in calculating class member address.
654
655 2018-10-08   John Darrington <john@darrington.wattle.id.au>
656
657     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
658       (check_producer): Check if the producer is codewarrior.
659       (producer_is_codewarrior): New function.
660       (lnp_state_machine::record_line): Ignore is_stmt flag for records
661        produced by codewarrior.
662       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
663
664 2018-10-06  Tom Tromey  <tom@tromey.com>
665
666         PR python/19399:
667         * python/py-inferior.c: Add "architecture" entry.
668         (infpy_architecture): New function.
669
670 2018-10-06  Tom Tromey  <tom@tromey.com>
671
672         PR python/21765:
673         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
674         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
675         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
676         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
677
678 2018-10-06  Tom Tromey  <tom@tromey.com>
679
680         PR build/17077:
681         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
682         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
683         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
684         #include.
685
686 2018-10-06  Tom Tromey  <tom@tromey.com>
687
688         * python/py-breakpoint.c (bppy_get_location): Handle a
689         bp_breakpoint without a location.
690
691 2018-10-06  Tom Tromey  <tom@tromey.com>
692
693         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
694         (_RegEx): Reformat help text.
695         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
696         (AnyCallerIs, AnyCallerMatches): Reformat help text.
697         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
698         text.
699         * python/lib/gdb/command/xmethods.py (InfoXMethod)
700         (EnableXMethod, DisableXMethod): Remove help indentation.
701         Capitalize meta-syntactic variables.
702         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
703         (EnableUnwinder, DisableUnwinder): Remove help indentation.
704         Capitalize meta-syntactic variables.
705         * python/lib/gdb/command/explore.py (ExploreCommand)
706         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
707         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
708         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
709         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
710         Remove help indentation.
711         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
712         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
713         (DisableFrameFilter, SetFrameFilterPriority)
714         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
715
716 2018-10-06  Tom Tromey  <tom@tromey.com>
717
718         PR tui/28819:
719         * tui/tui-io.c (gdb_wgetch): New function.
720         (tui_mld_getc, tui_getc): Use it.
721
722 2018-10-05  Tom Tromey  <tom@tromey.com>
723
724         * sol-thread.c (sol_thread_target::wait): Rename inner
725         "save_ptid".
726
727 2018-10-04  Tom Tromey  <tom@tromey.com>
728
729         * configure: Rebuild.
730         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
731
732 2018-10-04  Tom Tromey  <tom@tromey.com>
733
734         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
735         declaration of "block".
736
737 2018-10-04  Tom Tromey  <tom@tromey.com>
738
739         * common/filestuff.c (fdwalk): Remove inner declaration of
740         "result".
741
742 2018-10-04  Tom Tromey  <tom@tromey.com>
743
744         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
745         "structs_addr" and hoist declaration.
746
747 2018-10-04  Tom Tromey  <tom@tromey.com>
748
749         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
750         variable "size".
751
752 2018-10-04  Tom Tromey  <tom@tromey.com>
753
754         * mdebugread.c (parse_partial_symbols): Use std::string.
755
756 2018-10-04  Tom Tromey  <tom@tromey.com>
757
758         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
759         * p-valprint.c (pascal_val_print): Split inner "i" variable.
760         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
761         header.
762         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
763         more inner scope.
764         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
765         * varobj.c (varobj_update): Rename inner "newobj",
766         "type_changed".
767         * valprint.c (generic_emit_char): Rename inner "buf".
768         * valops.c (find_overload_match): Rename inner "temp".
769         (value_struct_elt_for_reference): Declare "v" in more inner
770         scope.
771         * v850-tdep.c (v850_push_dummy_call): Rename "len".
772         * unittests/array-view-selftests.c (run_tests): Rename inner
773         "vec".
774         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
775         header.
776         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
777         "tsv" in more inner scope.
778         (print_one_static_tracepoint_marker): Rename inner
779         "tuple_emitter".
780         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
781         (tic6x_push_dummy_call): Don't redeclare "addr".
782         * target-float.c: Declare "dto" lower.
783         * symtab.c (lookup_local_symbol): Rename inner "sym".
784         (find_pc_sect_line): Rename inner "pc".
785         * stack.c (print_frame): Don't redeclare "gdbarch".
786         (return_command): Rename inner "gdbarch".
787         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
788         "sp".
789         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
790         header.
791         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
792         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
793         scope.
794         * remote.c (remote_target::update_thread_list): Don't redeclare
795         "tp".
796         (remote_target::process_initial_stop_replies): Rename inner
797         "thread".
798         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
799         (remote_target::wait_as): Don't redeclare "stop_reply".
800         (remote_target::get_thread_local_address): Rename inner
801         "result".
802         (remote_target::get_tib_address): Likewise.
803
804         * regcache.c (cooked_read_test): Rename "regnum".
805         * record-btrace.c (cmd_record_btrace_start): Rename inner
806         "exception".
807         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
808         loop header.
809         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
810         header.
811         (ppu2spu_sniffer): Rename inner "buf".
812         * parse.c (operator_check_standard): Rename inner "type",
813         "objfile".
814         * p-valprint.c (pascal_val_print): Introduce new scope for
815         "low_bound", "high_bound".
816         * p-exp.y (yylex): Declare "i" in loop header.
817         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
818         Lower declaration of "s".
819         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
820         header.
821         (nios2_push_dummy_call): Rename "len".
822         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
823         "buf".
824         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
825         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
826         (linux_xfer_osdata_modules): Likewise.
827         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
828         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
829         (mips_o64_push_dummy_call): Likewise.
830         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
831         "op".
832         * mi/mi-main.c (list_available_thread_groups): Rename inner
833         "tuple_emitter".
834         (mi_cmd_data_read_memory): Rename inner "opts".
835         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
836         "tuple_emitter".
837         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
838         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
839         more inner scope.
840         (parse_partial_symbols): Rename inner "pst", "p", "name"
841         * main.c (captured_main_1): Rename inner "i"s.
842         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
843         "oso2".
844         * linux-tdep.c (linux_info_proc): Rename inner "filename".
845         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
846         * infrun.c (handle_no_resumed): Don't redeclare "thread".
847         (handle_signal_stop): Rename inner "gdbarch".
848         (handle_command): Declare "signum" in loop header.
849         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
850         "status".
851         (examine_prologue): Rename inner "sol" and "sof".
852         (ia64_extract_return_value): Rename inner "val".  Declare another
853         "val" in a more inner scope.
854         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
855         inner scope.
856         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
857         "except".
858         * findvar.c (default_read_var_value): Don't redeclare "addr".
859         * f-exp.y (yylex): Declare "i" in loop header.
860         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
861         Rename inner "type", "expect_type".
862         (evaluate_subexp_for_sizeof): Rename inner "pc".
863         * elfread.c (elf_symfile_read): Rename inner "abfd".
864         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
865         "bytes_read".
866         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
867         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
868         (dwarf_decode_line_header): Rename inner "lh".
869         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
870         "offset".  Declare "i" in loop header.
871         (disassemble_dwarf_expression): Rename inner "addr_size".
872         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
873         inner "result".
874         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
875         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
876         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
877         "inner_list_emitter".
878         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
879         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
880         declaration in a block.
881         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
882         * cp-valprint.c (cp_print_value_fields): Don't redeclare
883         "obstack_final_size".
884         * cp-support.c (inspect_type): Declare "i" in loop header.
885         * compile/compile.c (compile_instance::insert_symbol_error):
886         Rename inner "e".
887         * common/agent.c (agent_run_command): Remove inner "ret"
888         declaration.
889         * coffread.c (coff_symfile_read): Rename inner "name".
890         (coff_symfile_read): Rename inner "abfd".
891         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
892         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
893         "high".
894         * c-exp.y (lex_one_token): Move "len" declaration lower.
895         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
896         "gdbarch".
897         (create_exception_master_breakpoint): Likewise.  Don't redeclare
898         "b".
899         (watch_command_1): Declare "mark" later.
900         (clear_command): Don't shadow "a" or "b".
901         (delete_command): Rename inner "b".
902         (delete_trace_command): Likewise.
903         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
904         "op".
905         (arm_gdbarch_init): Remove inner "e_flags".
906         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
907         "offset" in inner blocks.
908
909 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
910
911         * dwarf-index-write.c (file_write): Don't write if the vector is
912         empty.
913
914 2018-10-05  Tom de Vries  <tdevries@suse.de>
915
916         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
917         PyArg_ParseTuple call.
918
919 2018-10-05  Tom de Vries  <tdevries@suse.de>
920
921         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
922         PyArg_ParseTuple call.
923
924 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
925
926         * psymtab.c (recursively_search_psymtabs): Reformat parameters
927         to avoid exceeding 80 characters per line limit.
928
929 2018-10-04  Tom Tromey  <tom@tromey.com>
930
931         * symfile.c (syms_from_objfile_1, finish_new_objfile)
932         (reread_symbols): Update.
933         * complaints.h (clear_complaints): Remove argument.
934         * complaints.c (enum complaint_series): Remove.
935         (series): Remove global.
936         (complaint_internal): Update.
937         (clear_complaints): Remove argument.
938
939 2018-10-04  Tom Tromey  <tom@tromey.com>
940
941         * symfile.c (symbol_file_add_with_addrs): Do not print "no
942         debugging symbols" message if there is a separate debug objfile.
943
944 2018-10-04  Tom Tromey  <tom@tromey.com>
945
946         PR cli/19551:
947         * symfile.c (symbol_file_add_with_addrs): Update output.
948         * psymtab.c (require_partial_symbols): Update output.
949
950 2018-10-04  Tom Tromey  <tom@tromey.com>
951
952         PR cli/22234:
953         * complaints.c: Emit \n.
954
955 2018-10-04  Tom Tromey  <tom@tromey.com>
956
957         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
958         (separate_debug_file_exists, find_separate_debug_file)
959         (add_symbol_file_command, reread_symbols, allocate_symtab)
960         (allocate_compunit_symtab): Use filtered printing, not
961         unfiltered.
962         * psymtab.c (require_partial_symbols, dump_psymtab)
963         (allocate_psymtab): Use filtered printing, not unfiltered.
964
965 2018-10-04  Tom Tromey  <tom@tromey.com>
966
967         * complaints.c (complaint_internal): Correctly check complaint
968         count.
969
970 2018-10-04  Tom Tromey  <tom@tromey.com>
971
972         * complaints.h (struct complaints): Remove declaration.
973         * complaints.c (clear_complaints): Remove an unused variable.
974
975 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
976
977         * MAINTAINERS (Write After Approval): Add self.
978
979 2018-10-03  Tom Tromey  <tom@tromey.com>
980
981         * guile/scm-value.c (gdbscm_value_to_string): Initialize
982         "buffer_contents".
983         * coffread.c (coff_symtab_read): Initialize "newobj".
984
985 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
986
987         * dwarf2read.c (read_func_scope): Remove struct keyword in
988         range-based for.
989
990 2018-10-03  Tom Tromey  <tom@tromey.com>
991
992         * README: Mention --enable-ubsan.
993         * NEWS: Mention --enable-ubsan.
994         * acinclude.m4: Include sanitize.m4.
995         * configure: Rebuild.
996         * configure.ac: Call AM_GDB_UBSAN.
997         * sanitize.m4: New file.
998
999 2018-10-03  Tom Tromey  <tom@tromey.com>
1000
1001         * expression.h (enum exp_opcode): Use uint8_t as base type.
1002         * expprint.c (op_name): Handle invalid opcodes.
1003
1004 2018-10-03  Tom Tromey  <tom@tromey.com>
1005
1006         * parse.c (prefixify_expression): Add assert.
1007         (parse_exp_in_context_1): Throw exception if the expression is
1008         empty.
1009
1010 2018-10-03  Tom Tromey  <tom@tromey.com>
1011
1012         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1013
1014 2018-10-03  Tom Tromey  <tom@tromey.com>
1015
1016         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1017
1018 2018-10-03  Tom Tromey  <tom@tromey.com>
1019
1020         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1021         unsigned.
1022
1023 2018-10-03  Tom Tromey  <tom@tromey.com>
1024
1025         * findvar.c (extract_integer): Do work in an unsigned type.
1026
1027 2018-10-03  Tom Tromey  <tom@tromey.com>
1028
1029         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1030         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1031         base type.
1032         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1033         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1034         type.
1035         * c-lang.h (enum c_string_type_values): Use unsigned as base
1036         type.
1037         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1038
1039 2018-10-03  Tom Tromey  <tom@tromey.com>
1040
1041         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1042         <~dwarf2_frame_state_reg_info>: Update.
1043         <dwarf2_frame_state_reg_info>: Update.
1044         <alloc_regs>: Add assertion.  Update.
1045         <reg>: Now a std::vector.
1046         <num_regs>: Remove.
1047         <swap>: Update.
1048         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1049         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1050
1051 2018-10-03  Tom Tromey  <tom@tromey.com>
1052
1053         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1054
1055 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1056
1057         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1058
1059 2018-10-02  Tom Tromey  <tom@tromey.com>
1060
1061         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1062
1063 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1064
1065         * NEWS: Mention changed commands.
1066         * ser-uds.c: New file.
1067         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1068         * configure: Regenerate.
1069         * Makefile.in: Add new file.
1070         * serial.c (serial_open): Check if filename is a socket
1071           and lookup the appropriate interface accordingly.
1072
1073 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1074
1075         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1076         define.
1077         (AARCH64_EXTRA_MAGIC): Likewise.
1078         (AARCH64_FPSIMD_MAGIC): Likewise.
1079         (AARCH64_SVE_MAGIC): Likewise.
1080         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1081         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1082         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1083         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1084         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1085         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1086         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1087         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1088         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1089         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1090         (read_aarch64_ctx): Add function.
1091         (aarch64_linux_sigframe_init): Detect FP registers.
1092
1093 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1094
1095         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1096         (AARCH64_D0_REGNUM): Likewise.
1097         (AARCH64_S0_REGNUM): Likewise.
1098         (AARCH64_H0_REGNUM): Likewise.
1099         (AARCH64_B0_REGNUM): Likewise.
1100         (AARCH64_SVE_V0_REGNUM): Likewise.
1101         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1102         (AARCH64_D0_REGNUM): Likewise.
1103         (AARCH64_S0_REGNUM): Likewise.
1104         (AARCH64_H0_REGNUM): Likewise.
1105         (AARCH64_B0_REGNUM): Likewise.
1106         (AARCH64_SVE_V0_REGNUM): Likewise.
1107
1108 2018-10-01  Gary Benson <gbenson@redhat.com>
1109
1110         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1111         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1112         prfpregset_t instead of gdb_prfpregset_t.
1113         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1114         * configure, config.in: Rebuild.
1115
1116 2018-10-01  Gary Benson <gbenson@redhat.com>
1117
1118         * common/gdb_proc_service.h: New file, factored out from...
1119         * gdb_proc_service.h: Moved common code to the above file.
1120         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1121
1122 2018-10-01  Gary Benson <gbenson@redhat.com>
1123
1124         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1125         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1126
1127 2018-10-01  Gary Benson <gbenson@redhat.com>
1128
1129         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1130         (AC_CHECK_HEADERS): Check for linux/elf.h.
1131         * configure, config.in: Rebuild.
1132         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1133         doesn't define elf_fpregset_t.
1134
1135 2018-10-01  Gary Benson <gbenson@redhat.com>
1136
1137         * gdb_proc_service.h: Whitespace change.
1138
1139 2018-10-01  Tom Tromey  <tom@tromey.com>
1140
1141         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1142         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1143         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1144
1145 2018-10-01  Tom Tromey  <tom@tromey.com>
1146
1147         * README: Minor change.
1148
1149 2018-09-30  Pedro Alves  <palves@redhat.com>
1150
1151         * darwin-nat-info.c (darwin_debug_regions_recurse)
1152         (info_mach_exceptions_command): Remove unused local variables.
1153         * darwin-nat.c (darwin_decode_notify_message)
1154         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1155         (darwin_stop_inferior, darwin_setup_exceptions)
1156         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1157         (darwin_nat_target::attach, darwin_nat_target::detach)
1158         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1159         local variables.
1160         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1161         variables.
1162
1163 2018-09-29  Tom Tromey  <tom@tromey.com>
1164
1165         * README: Remove some leftover text.
1166
1167 2018-09-29  Tom Tromey  <tom@tromey.com>
1168
1169         * PROBLEMS: Rewrite.
1170         * README: Update.
1171
1172 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1173
1174         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1175         case with explicit breakpoint kind.
1176         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1177         'additional_info' and related logic.
1178         (riscv_debug_breakpoints): New variable.
1179         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1180         instruction to determine the breakpoint kind.
1181         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1182         flag.  Update description of 'set/show riscv
1183         use-compressed-breakpoints' flag.
1184
1185 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1186
1187         (NEWS): Mention changes to frame related commands.
1188         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1189         (add_prefix_cmd_suppress_notification): New function.
1190         (add_com_suppress_notification): Call
1191         add_cmd_suppress_notification.
1192         * command.h (add_cmd_suppress_notification): Declare.
1193         (add_prefix_cmd_suppress_notification): Declare.
1194         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1195         (parse_frame_specification): Moved from stack.c, with
1196         simplification to handle a single argument.
1197         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1198         switch to the selected frame.  Add a header comment.
1199         * stack.c: Remove 'safe-ctype.h' include.
1200         (find_frame_for_function): Add declaration.
1201         (find_frame_for_address): New function.
1202         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1203         (frame_selection_by_function_completer): New function.
1204         (info_frame_command): Rename to...
1205         (info_frame_command_core): ...this, and update parameter types.
1206         (select_frame_command): Rename to...
1207         (select_frame_command_core): ...this, and update parameter types.
1208         (frame_command): Rename to...
1209         (frame_command_core): ...this, and update parameter types.
1210         (class frame_command_helper): New class to wrap implementations of
1211         frame related sub-commands.
1212         (frame_apply_cmd_list): New static global.
1213         (frame_cmd_list): Make static.
1214         (select_frame_cmd_list): New global for sub-commands.
1215         (info_frame_cmd_list): New global for sub-commands.
1216         (_initialize_stack): Register sub-commands for 'frame',
1217         'select-frame', and 'info frame'.  Update 'frame apply' commands
1218         to use frame_apply_cmd_list.  Move function local static
1219         frame_apply_list to file static frame_apply_cmd_list for
1220         consistency.
1221         * stack.h (select_frame_command): Delete declarationn.
1222         (select_frame_for_mi): Declare new function.
1223
1224 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1225
1226         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1227         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1228         and NOP.
1229
1230 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1231
1232         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1233
1234 2018-09-26  Tom Tromey  <tom@tromey.com>
1235
1236         * valops.c (auto_abandon): Remove dead code.
1237
1238 2018-09-26  Tom Tromey  <tom@tromey.com>
1239
1240         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1241
1242 2018-09-24  Tom Tromey  <tom@tromey.com>
1243
1244         * common/pathstuff.c (get_standard_cache_dir): Make
1245         "xdg_cache_home" and "home" const.
1246         * top.c (init_history): Make "tmpenv" const.
1247         * main.c (get_init_files): Make "homedir" const.
1248
1249 2018-09-23  Tom Tromey  <tom@tromey.com>
1250
1251         PR python/18852:
1252         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1253
1254 2018-09-23  Tom Tromey  <tom@tromey.com>
1255
1256         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1257         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1258         * python/python-internal.h (gdbpy_handle_exception): Declare.
1259         * python/py-utils.c (gdbpy_handle_exception): New function.
1260
1261 2018-09-23  Tom Tromey  <tom@tromey.com>
1262
1263         PR python/17284:
1264         * python/py-type.c (typy_template_argument): Check for negative
1265         argument number.
1266
1267 2018-09-23  Tom Tromey  <tom@tromey.com>
1268
1269         PR python/14062:
1270         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1271
1272 2018-09-23  Tom Tromey  <tom@tromey.com>
1273
1274         PR python/18170:
1275         * python/py-value.c (valpy_int): Allow conversion from pointer
1276         type.
1277
1278 2018-09-23  Tom Tromey  <tom@tromey.com>
1279
1280         PR python/20126:
1281         * python/py-value.c (valpy_int): Respect type sign.
1282
1283 2018-09-23  Tom Tromey  <tom@tromey.com>
1284
1285         PR python/18352;
1286         * python/py-value.c (valpy_float): Allow conversions from int or
1287         char.
1288         (valpy_int, valpy_long): Allow conversions from float.
1289
1290 2018-09-23  Tom Tromey  <tom@tromey.com>
1291
1292         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1293         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1294
1295 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1296
1297         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1298         __sighndlr.
1299         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1300
1301 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1302
1303         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1304         target_terminal::ours().
1305
1306 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1307
1308         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1309         of vl to ULONGEST.
1310
1311 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1312
1313         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1314         redundant condition.
1315
1316 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1317
1318         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1319
1320         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1321         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1322         * sol-thread.c (ps_pdmodel): Don't guard definition.
1323
1324         * procfs.c: Fix formatting.
1325
1326         * procfs.c (sysset_t_alloc): Remove.
1327         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1328         (procfs_debug_inferior): Likewise.
1329         (procfs_set_exec_trap): Likewise.
1330         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1331         (proc_set_traced_sysexit): Likewise.
1332
1333         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1334         (dead_procinfo): Likewise.
1335         (proc_warn): Likewise.
1336         (proc_error): Likewise.
1337         (proc_get_LDT_entry): Likewise.
1338         (do_attach): Likewise.
1339         (procfs_target::pid_to_str): Likewise.
1340         (iterate_over_mappings): Likewise.
1341
1342         * procfs.c (create_procinfo): Fix ARI warning.
1343         (proc_get_status): Likewise.
1344         (proc_stop_process): Likewise.
1345         (proc_run_process): Likewise.
1346         (proc_kill): Likewise.
1347         (proc_get_LDT_entry): Likewise.
1348         (procfs_find_LDT_entry): Likewise.
1349         (proc_update_threads): Likewise.
1350         (proc_iterate_over_threads): Likewise.
1351         (do_attach): Likewise.
1352         (procfs_xfer_memory): Likewise.
1353         (invalidate_cache): Likewise.
1354         (procfs_target::resume): Likewise.
1355         (procfs_init_inferior): Likewise.
1356         (procfs_set_exec_trap): Likewise.
1357         (procfs_target::thread_alive): Likewise.
1358         (procfs_target::pid_to_exec_file): Likewise.
1359         (iterate_over_mappings): Likewise.
1360         (procfs_target::make_corefile_notes): Likewise.
1361         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1362
1363         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1364         (procfs_find_LDT_entry): Likewise.
1365         * sol-thread.c (ps_lgetLDT): Likewise.
1366
1367 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1368
1369         PR tdep/17903
1370         * procfs.c (procfs_target): Declare pid_to_exec_file.
1371         (procfs_target::pid_to_exec_file): New.
1372
1373 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1374
1375         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1376         renaming.
1377         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1378         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1379
1380 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1381
1382         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1383         (supply_fpregset, fill_fpregset): Move ...
1384         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1385         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1386         Remove references to ioctl-based procfs.
1387         Include <sys/reg.h>.
1388         Remove PR_MODEL_NATIVE guards.
1389         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1390         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1391
1392 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1393
1394         PR gdb/20981:
1395         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1396         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1397         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1398
1399 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1400
1401         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1402         (fbsd_print_sockaddr_in6): Likewise.
1403
1404 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1405             Chris January  <chris.january@arm.com>
1406
1407         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1408         (evaluate_subexp_standard): Return a dummy type when
1409         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1410         OP_F77_UNDETERMINED_ARGLIST case.
1411         * expression.h (enum noside): Update comment.
1412
1413 2018-09-19  George Vasick <george.vasick@oracle.com>
1414
1415         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1416
1417 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1418             April Chin <april.chin@oracle.com>
1419             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1420
1421         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1422         uint_t lwpid_t.
1423         (create_procinfo): Print pids in /proc without leading zeros.
1424
1425 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1426
1427         * nios2-tdep.c (nios2_gcc_target_options): New.
1428         (nios2_gdb_arch_init): Install new hook.
1429
1430 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1431
1432         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1433         New file.
1434         * update-gnulib.sh: Apply patch.
1435         * configure: Re-generate.
1436
1437 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1438
1439         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1440         description.  Make "info proc" command descriptions more
1441         consistent.
1442
1443 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1444
1445         * NEWS: Mention 'info proc files' command.
1446
1447 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1448
1449         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1450         descriptors for IP_FILES and IP_ALL.
1451
1452 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1453
1454         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1455         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1456         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1457         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1458         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1459         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1460         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1461         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1462         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1463         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1464         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1465         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1466         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1467         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1468         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1469         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1470         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1471         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1472         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1473         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1474         (struct fbsd_sockaddr_un): New types.
1475         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1476         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1477         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1478         (fbsd_core_info_proc_files): New functions.
1479         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1480         IP_ALL.
1481         * fbsd-tdep.h (fbsd_info_proc_files_header)
1482         (fbsd_info_proc_files_entry): New.
1483
1484 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1485
1486         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1487         * infcmd.c (info_proc_cmd_files): New function.
1488         (_initialize_infcmd): Register 'info proc files' command.
1489
1490 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1491
1492         * gnulib/aclocal-m4-deps.mk: Re-generate.
1493         * gnulib/aclocal.m4: Re-generate.
1494         * gnulib/config.in: Re-generate.
1495         * gnulib/configure: Re-generate.
1496         * gnulib/import/Makefile.am: Re-generate.
1497         * gnulib/import/Makefile.in: Re-generate.
1498         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1499         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1500         * gnulib/import/arpa_inet.in.h: New file.
1501         * gnulib/import/inet_ntop.c: New file.
1502         * gnulib/import/m4/arpa_inet_h.m4: New file.
1503         * gnulib/import/m4/inet_ntop.m4: New file.
1504         * gnulib/import/m4/netinet_in_h.m4: New file.
1505         * gnulib/import/m4/socklen.m4: New file.
1506         * gnulib/import/m4/sockpfaf.m4: New file.
1507         * gnulib/import/m4/stdalign.m4: New file.
1508         * gnulib/import/m4/sys_uio_h.m4: New file.
1509         * gnulib/import/netinet_in.in.h: New file.
1510         * gnulib/import/stdalign.in.h: New file.
1511         * gnulib/import/sys_socket.c: New file.
1512         * gnulib/import/sys_socket.in.h: New file.
1513         * gnulib/import/sys_uio.in.h: New file.
1514         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1515         module.
1516
1517 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1518
1519         * gnulib/aclocal-m4-deps.mk: New file.
1520         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1521         deterministically.
1522
1523 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1524
1525         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1526         KVE_PATH.
1527
1528 2018-09-18  Tom Tromey  <tom@tromey.com>
1529
1530         * compile/compile-object-load.c (struct
1531         link_hash_table_cleanup_data): Add constructor and destructor.
1532         Use DISABLE_COPY_AND_ASSIGN.
1533         (~link_hash_table_cleanup_data): Rename from
1534         link_hash_table_free.  Now a destructor.
1535         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1536
1537 2018-09-18  Tom Tromey  <tom@tromey.com>
1538
1539         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1540         * compile/compile-object-load.c (struct munmap_list): Move to
1541         header file.
1542         (munmap_list::add): Rename from munmap_list_add; rewrite.
1543         (munmap_list::~munmap_list): Rename from munmap_list_free.
1544         (munmap_listp_free_cleanup): Remove.
1545         (compile_object_load): Update.
1546         * compile/compile-object-load.h (struct munmap_list): Move from
1547         compile-object-load.c.  Rewrite.
1548
1549 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1550
1551         * aarch64-tdep.c (pass_in_v): Use register size.
1552         (aarch64_extract_return_value): Likewise.
1553         (aarch64_store_return_value): Likewise.
1554
1555 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1556
1557         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1558         rlim_t.
1559
1560 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1561
1562         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1563         Fix short help line.
1564
1565 2018-09-17  Tom Tromey  <tom@tromey.com>
1566
1567         PR python/20445:
1568         * configure: Rebuild.
1569         * configure.ac: Conditionally use -DNDEBUG for Python.
1570
1571 2018-09-17  Tom Tromey  <tom@tromey.com>
1572
1573         * configure: Rebuild.
1574         * configure.ac: Use gmp as a library dependency when checking for
1575         mpfr.
1576
1577 2018-09-17  Pedro Alves  <palves@redhat.com>
1578
1579         * python/py-inferior.c (find_inferior_object): Delete.
1580
1581 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1582
1583         * compile/compile-cplus-types.c
1584         (compile_cplus_instance::enter_scope): Don't use new_scope after
1585         std::move.
1586
1587 2018-09-17  Tom Tromey  <tom@tromey.com>
1588
1589         * common/pathstuff.c (get_standard_cache_dir): Use
1590         ~/Library/Caches on macOS.
1591         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1592
1593 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1594
1595         PR python/23669
1596         * breakpoint.c (commands_cmd_element): New.
1597         (_initialize_breakpoint): Assign commands_cmd_element.
1598         * breakpoint.h (commands_cmd_element): New.
1599         * cli/cli-script.c (while_cmd_element, if_command,
1600         define_cmd_element): New.
1601         (command_name_equals): Remove.
1602         (process_next_line): Compare commands by pointer, not by name.
1603         (_initialize_cli_script): Assign the various cmd_list_element
1604         variables.
1605         * compile/compile.c (compile_cmd_element): New.
1606         (_initialize_compile): Assign compile_cmd_element.
1607         * compile/compile.h (compile_cmd_element): New.
1608         * guile/guile.c (guile_cmd_element): New.
1609         (install_gdb_commands): Assign guile_cmd_element.
1610         * guile/guile.h (guile_cmd_element): New.
1611         * python/python.c (python_cmd_element): New.
1612         (_initialize_python): Assign python_cmd_element.
1613         * python/python.h (python_cmd_element): New.
1614         * tracepoint.c (while_stepping_cmd_element): New.
1615         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1616         * tracepoint.h (while_stepping_cmd_element): New.
1617
1618 2018-09-17  Tom Tromey  <tom@tromey.com>
1619
1620         * infrun.c (save_infcall_suspend_state): Return
1621         infcall_suspend_state_up.
1622         (save_infcall_control_state): Return infcall_control_state_up.
1623         * inferior.h (save_infcall_suspend_state)
1624         (save_infcall_control_state): Declare later.  Return unique
1625         pointers.
1626
1627 2018-09-17  Tom Tromey  <tom@tromey.com>
1628
1629         * infrun.c (struct stop_context): Declare constructor,
1630         destructor, "changed" method.
1631         (stop_context::stop_context): Rename from save_stop_context.
1632         (stop_context::~stop_context): Rename from
1633         release_stop_context_cleanup.
1634         (normal_stop): Update.
1635         (stop_context::changed): Rename from stop_context_changed.  Return
1636         bool.
1637
1638 2018-09-17  Tom Tromey  <tom@tromey.com>
1639
1640         * inferior.h (struct infcall_suspend_state_deleter): New.
1641         (infcall_suspend_state_up): New typedef.
1642         (struct infcall_control_state_deleter): New.
1643         (infcall_control_state_up): New typedef.
1644         (make_cleanup_restore_infcall_suspend_state)
1645         (make_cleanup_restore_infcall_control_state): Don't declare.
1646         * infcall.c (call_function_by_hand_dummy): Update.
1647         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1648         (make_cleanup_restore_infcall_suspend_state): Remove.
1649         (do_restore_infcall_control_state_cleanup)
1650         (make_cleanup_restore_infcall_control_state): Remove.
1651
1652 2018-09-17  Tom Tromey  <tom@tromey.com>
1653
1654         * gdbthread.h (struct thread_control_state): Add initializer.
1655         (class thread_info) <control>: Remove initializer.
1656         * inferior.h (struct inferior_control_state): Add initializer.
1657         (class inferior) <control>: Remove initializer.
1658         (exit_inferior_1): Update.
1659         * infrun.c (struct infcall_control_state): Add constructors.
1660         (save_infcall_control_state): Use new.
1661         (restore_infcall_control_state, discard_infcall_control_state):
1662         Use delete.
1663
1664 2018-09-17  Tom Tromey  <tom@tromey.com>
1665
1666         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1667         unique_ptr.
1668         <siginfo_data>: Now a unique_xmalloc_ptr.
1669         (save_infcall_suspend_state, restore_infcall_suspend_state)
1670         (discard_infcall_suspend_state)
1671         (get_infcall_suspend_state_regcache): Update.
1672
1673 2018-09-17  Tom Tromey  <tom@tromey.com>
1674
1675         * gdbthread.h (struct thread_suspend_state): Add initializers.
1676         (class thread_info) <suspend>: Remove initializer.
1677         * infrun.c (struct infcall_suspend_state): Add initializers.
1678         (save_infcall_suspend_state): Use new.
1679         (discard_infcall_suspend_state): Use delete.
1680
1681 2018-09-16  Tom Tromey  <tom@tromey.com>
1682
1683         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1684         Remove.
1685         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1686         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1687         (py_varobj_iter_new): Likewise.
1688         (py_varobj_get_iterator): Use gdbpy_ref.
1689
1690 2018-09-16  Tom Tromey  <tom@tromey.com>
1691
1692         * python/py-threadevent.c (py_get_event_thread): Simplify.
1693         * python/py-inferior.c (infpy_thread_from_thread_handle):
1694         Return immediately after calling thread_to_thread_object.  Use
1695         Py_RETURN_NONE.
1696         (thread_to_thread_object): Set the exception on a NULL return.
1697
1698 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1699
1700         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1701
1702 2018-09-16  Tom Tromey  <tom@tromey.com>
1703
1704         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1705         Remove.
1706
1707 2018-09-16  Tom Tromey  <tom@tromey.com>
1708
1709         * python/python-internal.h (thread_to_thread_object): Change
1710         return type.
1711         * python/py-inferior.c (thread_to_thread_object): Return a new
1712         reference.
1713         (infpy_thread_from_thread_handle): Update.
1714         * python/py-infthread.c (gdbpy_selected_thread): Update.
1715         * python/py-stopevent.c (create_stop_event_object): Update.
1716         * python/py-threadevent.c (py_get_event_thread): Return a new
1717         reference.
1718         (py_get_event_thread): Update.
1719         * python/py-event.h (py_get_event_thread): Change return type.
1720         * python/py-continueevent.c (create_continue_event_object):
1721         Update.
1722
1723 2018-09-16  Tom Tromey  <tom@tromey.com>
1724
1725         * python/py-progspace.c (pspy_get_objfiles): Update.
1726         * python/python-internal.h (objfile_to_objfile_object): Change
1727         return type.
1728         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1729         Update.
1730         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1731         Update.
1732         * python/python.c (gdbpy_get_current_objfile): Update.
1733         (gdbpy_objfiles): Update.
1734         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1735         Update.
1736         (objfile_to_objfile_object): Return a new reference.
1737         * python/py-symtab.c (stpy_get_objfile): Update.
1738         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1739         Update.
1740
1741 2018-09-16  Tom Tromey  <tom@tromey.com>
1742
1743         * python/py-inferior.c (infpy_get_progspace): Update.
1744         * python/python-internal.h (pspace_to_pspace_object): Change
1745         return type.
1746         * python/py-newobjfileevent.c
1747         (create_clear_objfiles_event_object): Update.
1748         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1749         Update.
1750         * python/python.c (gdbpy_get_current_progspace): Update.
1751         (gdbpy_progspaces): Update.
1752         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1753         reference.
1754         * python/py-objfile.c (objfpy_get_progspace): Update.
1755         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1756         Update.
1757
1758 2018-09-16  Tom Tromey  <tom@tromey.com>
1759
1760         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1761         (solib_name, block_for_pc, find_pc_line): New functions.
1762         (execute_unwinders): Update.
1763         * python/py-block.c (gdbpy_block_for_pc): Remove.
1764         * python/py-inferior.c (infpy_get_progspace): New function.
1765         (inferior_object_getset) <progspace>: Add.
1766         * python/py-progspace.c (pspy_objfiles): Rewrite.
1767         (pspy_solib_name, pspy_block_for_pc)
1768         (pspy_find_pc_line, pspy_is_valid): New functions.
1769         (progspace_object_methods): Add entries for solib_name,
1770         block_for_pc, find_pc_line, is_valid.
1771         * python/python-internal.h (gdbpy_block_for_pc)
1772         (build_objfiles_list): Don't declare.
1773         * python/python.c: Don't include solib.h.
1774         (gdbpy_solib_name, gdbpy_find_pc_line)
1775         (gdbpy_get_current_progspace, build_objfiles_list)
1776         (gdbpy_objfiles): Remove.
1777         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1778         solib_name, find_pc_line>: Remove entries.
1779
1780 2018-09-16  Tom Tromey  <tom@tromey.com>
1781
1782         * top.c (new_ui_command): Use GNU style for metasyntactic
1783         variables.
1784         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1785         variables.
1786         * maint.c (maintenance_translate_address): Remove "<>" around
1787         text.
1788         * interps.c (interpreter_exec_cmd): Use GNU style for
1789         metasyntactic variables.
1790         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1791         metasyntactic variables.
1792         * tracepoint.c (tfind_range_command): Use GNU style for
1793         metasyntactic variables.
1794         (tfind_outside_command): Likewise.
1795         (_initialize_tracepoint): Likewise.
1796         * remote.c (extended_remote_target::create_inferior): Use GNU
1797         style for metasyntactic variables.
1798         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1799         metasyntactic variables.
1800         (adi_assign_command): Likewise.
1801
1802 2018-09-16  Tom Tromey  <tom@tromey.com>
1803
1804         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1805         metasyntactic variables.  Print message if no disassembler options
1806         are available.
1807
1808 2018-09-15  Tom Tromey  <tom@tromey.com>
1809
1810         * infcmd.c (get_inferior_args): Return const char *.
1811         * inferior.h (get_inferior_args): Return type now const.
1812         * linux-tdep.c (linux_fill_prpsinfo): Update.
1813         * procfs.c (procfs_target::make_corefile_notes): Update.
1814
1815 2018-09-07  Tom Tromey  <tom@tromey.com>
1816
1817         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1818         inside the TRY.
1819
1820 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1821
1822         * nios2-tdep.c (nios2_type_align): New.
1823         (nios2_gdb_arch_init): Install type_align hook.
1824
1825 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1826
1827         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1828         type that is neither object file owned, nor gdbarch owned.
1829         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1830         gdbarch is non-NULL.
1831         (alloc_type_instance): Allocate non-objfile owned types on the
1832         gdbarch obstack.
1833         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1834         using TYPE_ALLOC to ensure memory is allocated on the correct
1835         obstack.
1836         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1837         obstack, or the gdbarch obstack.
1838         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1839
1840 2018-09-14  Tom Tromey  <tom@tromey.com>
1841
1842         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1843         block.
1844
1845 2018-09-14  Tom Tromey  <tom@tromey.com>
1846
1847         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1848
1849 2018-09-13  Tom Tromey  <tom@tromey.com>
1850
1851         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1852         static.
1853
1854 2018-09-13  Tom Tromey  <tom@tromey.com>
1855
1856         * exec.c (try_open_exec_file): Use std::string.
1857
1858 2018-09-13  Tom Tromey  <tom@tromey.com>
1859
1860         * utils.h (gdb_bfd_errmsg): Return std::string.
1861         * exec.c (exec_file_attach): Update.
1862         * compile/compile-object-load.c (compile_object_load): Update.
1863         * utils.c (gdb_bfd_errmsg): Return std::string.
1864
1865 2018-09-13  Tom Tromey  <tom@tromey.com>
1866
1867         * procfs.c (struct procinfo_deleter): New.
1868         (procinfo_up): New typedef.
1869         (do_destroy_procinfo_cleanup): Remove.
1870         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1871
1872 2018-09-13  Tom Tromey  <tom@tromey.com>
1873
1874         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1875
1876 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1877 2018-09-13  Tom Tromey  <tom@tromey.com>
1878
1879         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1880         (pspy_get_objfiles): New function.
1881         (progspace_object_methods): New.
1882         (pspace_object_type): Add tp_methods callback.
1883         * python/python-internal.h (build_objfiles_list): New
1884         declaration.
1885         * python/python.c (build_objfiles_list): New function.
1886         (gdbpy_objfiles): Implement using build_objfiles_list.
1887         * NEWS: Mention the Progspace.objfiles method.
1888
1889 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1890
1891         * python/py-inferior.c (infpy_get_progspace): New function.
1892         (inferior_object_getset): Add progspace property.
1893         * NEWS: Mention the new property.
1894
1895 2018-09-13  Tom Tromey  <tom@tromey.com>
1896
1897         PR rust/23650:
1898         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1899
1900 2018-09-13  Tom Tromey  <tom@tromey.com>
1901
1902         PR rust/23626:
1903         * rust-lang.c (rust_enum_variant): Now static.
1904         (rust_empty_enum_p): New function.
1905         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1906         Handle empty enum.
1907
1908 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1909
1910         * python/py-inferior.c (infpy_repr): New.
1911         (inferior_object_type): Register infpy_repr.
1912         * python/py-objfile.c (objfpy_repr): New.
1913         (objfile_object_type): Register objfpy_repr.
1914
1915 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1916
1917         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1918
1919 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1920
1921         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1922         typo.
1923
1924 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1925
1926         * common/common-utils.c: Don't include '<sys/stat.h>'.
1927         (is_regular_file): Move to...
1928         * common/filestuff.c (is_regular_file): ... here.
1929         * common/common-utils.h (is_regular_file): Move to...
1930         * common/filestuff.h (is_regular_file): ... here.
1931
1932 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1933
1934         * skip.c (debug_skip): New variable.
1935         (skiplist_entry::do_skip_file_p): Add debug output.
1936         (skiplist_entry::do_skip_gfile_p): Likewise.
1937         (skiplist_entry::skip_function_p): Likewise.
1938         (_initialize_step_skip): Create debug command.
1939         * NEWS: Mention set/show debug skip.
1940
1941 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1942
1943         * darwin-nat.c (should_disable_startup_with_shell):
1944         New function.
1945         (darwin_nat_target::create_inferior): Add call.
1946
1947 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1948
1949         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1950         inf_port, msg_state>: Initialize.
1951         (struct darwin_thread_info) <signaled, single_step>: Change
1952         type and initialize.
1953         (struct darwin_thread_info) <event>: Initialize.
1954
1955 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1956
1957         PR gdb/23555
1958         PR gdb/23558
1959         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1960         guesses.
1961
1962 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1963
1964         Revert:
1965         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1966
1967         PR gdb/23555
1968         PR gdb/23558
1969         * gnulib/aclocal.m4: Regenerate.
1970         * gnulib/config.in: Regenerate.
1971         * gnulib/configure: Regenerate.
1972         * gnulib/import/Makefile.am: Update.
1973         * gnulib/import/Makefile.in: Update.
1974         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1975         * gnulib/import/_Noreturn.h: ... this.
1976         * gnulib/import/alloca.in.h: Update.
1977         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1978         * gnulib/import/arg-nonnull.h: ... this.
1979         * gnulib/import/assure.h: Update.
1980         * gnulib/import/at-func.c: Update.
1981         * gnulib/import/basename-lgpl.c: Update.
1982         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1983         * gnulib/import/c++defs.h: ... this.
1984         * gnulib/import/canonicalize-lgpl.c: Update.
1985         * gnulib/import/cdefs.h: Update.
1986         * gnulib/import/chdir-long.c: Update.
1987         * gnulib/import/chdir-long.h: Update.
1988         * gnulib/import/cloexec.c: Update.
1989         * gnulib/import/cloexec.h: Update.
1990         * gnulib/import/close.c: Update.
1991         * gnulib/import/closedir.c: Update.
1992         * gnulib/import/config.charset: Update.
1993         * gnulib/import/dirent-private.h: Update.
1994         * gnulib/import/dirent.in.h: Update.
1995         * gnulib/import/dirfd.c: Update.
1996         * gnulib/import/dirname-lgpl.c: Update.
1997         * gnulib/import/dirname.h: Update.
1998         * gnulib/import/dosname.h: Update.
1999         * gnulib/import/dup-safer-flag.c: Update.
2000         * gnulib/import/dup-safer.c: Update.
2001         * gnulib/import/dup.c: Update.
2002         * gnulib/import/dup2.c: Update.
2003         * gnulib/import/errno.in.h: Update.
2004         * gnulib/import/error.c: Update.
2005         * gnulib/import/error.h: Update.
2006         * gnulib/import/exitfail.c: Update.
2007         * gnulib/import/exitfail.h: Update.
2008         * gnulib/import/extra/update-copyright: Update.
2009         * gnulib/import/fchdir.c: Update.
2010         * gnulib/import/fcntl.c: Update.
2011         * gnulib/import/fcntl.in.h: Update.
2012         * gnulib/import/fd-hook.c: Update.
2013         * gnulib/import/fd-hook.h: Update.
2014         * gnulib/import/fd-safer-flag.c: Update.
2015         * gnulib/import/fd-safer.c: Update.
2016         * gnulib/import/fdopendir.c: Update.
2017         * gnulib/import/filename.h: Update.
2018         * gnulib/import/filenamecat-lgpl.c: Update.
2019         * gnulib/import/filenamecat.h: Update.
2020         * gnulib/import/flexmember.h: Update.
2021         * gnulib/import/float+.h: Update.
2022         * gnulib/import/float.c: Update.
2023         * gnulib/import/float.in.h: Update.
2024         * gnulib/import/fnmatch.c: Update.
2025         * gnulib/import/fnmatch.in.h: Update.
2026         * gnulib/import/fnmatch_loop.c: Update.
2027         * gnulib/import/fpucw.h: Update.
2028         * gnulib/import/frexp.c: Update.
2029         * gnulib/import/frexpl.c: Update.
2030         * gnulib/import/fstat.c: Update.
2031         * gnulib/import/fstatat.c: Update.
2032         * gnulib/import/getcwd-lgpl.c: Update.
2033         * gnulib/import/getcwd.c: Update.
2034         * gnulib/import/getdtablesize.c: Update.
2035         * gnulib/import/getlogin_r.c: Update.
2036         * gnulib/import/getprogname.c: Update.
2037         * gnulib/import/getprogname.h: Update.
2038         * gnulib/import/gettext.h: Update.
2039         * gnulib/import/gettimeofday.c: Update.
2040         * gnulib/import/glob-libc.h: Update.
2041         * gnulib/import/glob.c: Update.
2042         * gnulib/import/glob.in.h: Update.
2043         * gnulib/import/glob_internal.h: Update.
2044         * gnulib/import/glob_pattern_p.c: Update.
2045         * gnulib/import/globfree.c: Update.
2046         * gnulib/import/hard-locale.c: Update.
2047         * gnulib/import/hard-locale.h: Update.
2048         * gnulib/import/intprops.h: Update.
2049         * gnulib/import/inttypes.in.h: Update.
2050         * gnulib/import/isnan.c: Update.
2051         * gnulib/import/isnand-nolibm.h: Update.
2052         * gnulib/import/isnand.c: Update.
2053         * gnulib/import/isnanl-nolibm.h: Update.
2054         * gnulib/import/isnanl.c: Update.
2055         * gnulib/import/itold.c: Update.
2056         * gnulib/import/libc-config.h: Update.
2057         * gnulib/import/limits.in.h: Update.
2058         * gnulib/import/localcharset.c: Update.
2059         * gnulib/import/localcharset.h: Update.
2060         * gnulib/import/localtime-buffer.c: Update.
2061         * gnulib/import/localtime-buffer.h: Update.
2062         * gnulib/import/lstat.c: Update.
2063         * gnulib/import/m4/00gnulib.m4: Update.
2064         * gnulib/import/m4/__inline.m4: Update.
2065         * gnulib/import/m4/absolute-header.m4: Update.
2066         * gnulib/import/m4/alloca.m4: Update.
2067         * gnulib/import/m4/builtin-expect.m4: Update.
2068         * gnulib/import/m4/canonicalize.m4: Update.
2069         * gnulib/import/m4/chdir-long.m4: Update.
2070         * gnulib/import/m4/close.m4: Update.
2071         * gnulib/import/m4/closedir.m4: Update.
2072         * gnulib/import/m4/configmake.m4: Update.
2073         * gnulib/import/m4/d-ino.m4: Update.
2074         * gnulib/import/m4/d-type.m4: Update.
2075         * gnulib/import/m4/dirent_h.m4: Update.
2076         * gnulib/import/m4/dirfd.m4: Update.
2077         * gnulib/import/m4/dirname.m4: Update.
2078         * gnulib/import/m4/double-slash-root.m4: Update.
2079         * gnulib/import/m4/dup.m4: Update.
2080         * gnulib/import/m4/dup2.m4: Update.
2081         * gnulib/import/m4/eealloc.m4: Update.
2082         * gnulib/import/m4/environ.m4: Update.
2083         * gnulib/import/m4/errno_h.m4: Update.
2084         * gnulib/import/m4/error.m4: Update.
2085         * gnulib/import/m4/exponentd.m4: Update.
2086         * gnulib/import/m4/exponentl.m4: Update.
2087         * gnulib/import/m4/extensions.m4: Update.
2088         * gnulib/import/m4/extern-inline.m4: Update.
2089         * gnulib/import/m4/fchdir.m4: Update.
2090         * gnulib/import/m4/fcntl-o.m4: Update.
2091         * gnulib/import/m4/fcntl.m4: Update.
2092         * gnulib/import/m4/fcntl_h.m4: Update.
2093         * gnulib/import/m4/fdopendir.m4: Update.
2094         * gnulib/import/m4/filenamecat.m4: Update.
2095         * gnulib/import/m4/flexmember.m4: Update.
2096         * gnulib/import/m4/float_h.m4: Update.
2097         * gnulib/import/m4/fnmatch.m4: Update.
2098         * gnulib/import/m4/fnmatch_h.m4: Update.
2099         * gnulib/import/m4/fpieee.m4: Update.
2100         * gnulib/import/m4/frexp.m4: Update.
2101         * gnulib/import/m4/frexpl.m4: Update.
2102         * gnulib/import/m4/fstat.m4: Update.
2103         * gnulib/import/m4/fstatat.m4: Update.
2104         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2105         * gnulib/import/m4/getcwd-path-max.m4: Update.
2106         * gnulib/import/m4/getcwd.m4: Update.
2107         * gnulib/import/m4/getdtablesize.m4: Update.
2108         * gnulib/import/m4/getlogin.m4: Update.
2109         * gnulib/import/m4/getlogin_r.m4: Update.
2110         * gnulib/import/m4/getpagesize.m4: Update.
2111         * gnulib/import/m4/getprogname.m4: Update.
2112         * gnulib/import/m4/gettimeofday.m4: Update.
2113         * gnulib/import/m4/glibc21.m4: Update.
2114         * gnulib/import/m4/glob.m4: Update.
2115         * gnulib/import/m4/glob_h.m4: Update.
2116         * gnulib/import/m4/gnulib-cache.m4: Update.
2117         * gnulib/import/m4/gnulib-common.m4: Update.
2118         * gnulib/import/m4/gnulib-comp.m4: Update.
2119         * gnulib/import/m4/gnulib-tool.m4: Update.
2120         * gnulib/import/m4/hard-locale.m4: Update.
2121         * gnulib/import/m4/include_next.m4: Update.
2122         * gnulib/import/m4/inttypes-pri.m4: Update.
2123         * gnulib/import/m4/inttypes.m4: Update.
2124         * gnulib/import/m4/isnand.m4: Update.
2125         * gnulib/import/m4/isnanl.m4: Update.
2126         * gnulib/import/m4/largefile.m4: Update.
2127         * gnulib/import/m4/limits-h.m4: Update.
2128         * gnulib/import/m4/localcharset.m4: Update.
2129         * gnulib/import/m4/locale-fr.m4: Update.
2130         * gnulib/import/m4/locale-ja.m4: Update.
2131         * gnulib/import/m4/locale-zh.m4: Update.
2132         * gnulib/import/m4/localtime-buffer.m4: Update.
2133         * gnulib/import/m4/longlong.m4: Update.
2134         * gnulib/import/m4/lstat.m4: Update.
2135         * gnulib/import/m4/malloc.m4: Update.
2136         * gnulib/import/m4/malloca.m4: Update.
2137         * gnulib/import/m4/math_h.m4: Update.
2138         * gnulib/import/m4/mbrtowc.m4: Update.
2139         * gnulib/import/m4/mbsinit.m4: Update.
2140         * gnulib/import/m4/mbsrtowcs.m4: Update.
2141         * gnulib/import/m4/mbstate_t.m4: Update.
2142         * gnulib/import/m4/memchr.m4: Update.
2143         * gnulib/import/m4/memmem.m4: Update.
2144         * gnulib/import/m4/mempcpy.m4: Update.
2145         * gnulib/import/m4/memrchr.m4: Update.
2146         * gnulib/import/m4/mkdir.m4: Update.
2147         * gnulib/import/m4/mkstemp.m4: Update.
2148         * gnulib/import/m4/mmap-anon.m4: Update.
2149         * gnulib/import/m4/mode_t.m4: Update.
2150         * gnulib/import/m4/msvc-inval.m4: Update.
2151         * gnulib/import/m4/msvc-nothrow.m4: Update.
2152         * gnulib/import/m4/multiarch.m4: Update.
2153         * gnulib/import/m4/nocrash.m4: Update.
2154         * gnulib/import/m4/off_t.m4: Update.
2155         * gnulib/import/m4/onceonly.m4: Update.
2156         * gnulib/import/m4/open-cloexec.m4: Update.
2157         * gnulib/import/m4/open.m4: Update.
2158         * gnulib/import/m4/openat.m4: Update.
2159         * gnulib/import/m4/opendir.m4: Update.
2160         * gnulib/import/m4/pathmax.m4: Update.
2161         * gnulib/import/m4/rawmemchr.m4: Update.
2162         * gnulib/import/m4/readdir.m4: Update.
2163         * gnulib/import/m4/readlink.m4: Update.
2164         * gnulib/import/m4/realloc.m4: Update.
2165         * gnulib/import/m4/rename.m4: Update.
2166         * gnulib/import/m4/rewinddir.m4: Update.
2167         * gnulib/import/m4/rmdir.m4: Update.
2168         * gnulib/import/m4/save-cwd.m4: Update.
2169         * gnulib/import/m4/secure_getenv.m4: Update.
2170         * gnulib/import/m4/setenv.m4: Update.
2171         * gnulib/import/m4/signal_h.m4: Update.
2172         * gnulib/import/m4/ssize_t.m4: Update.
2173         * gnulib/import/m4/stat-time.m4: Update.
2174         * gnulib/import/m4/stat.m4: Update.
2175         * gnulib/import/m4/std-gnu11.m4: Update.
2176         * gnulib/import/m4/stdbool.m4: Update.
2177         * gnulib/import/m4/stddef_h.m4: Update.
2178         * gnulib/import/m4/stdint.m4: Update.
2179         * gnulib/import/m4/stdio_h.m4: Update.
2180         * gnulib/import/m4/stdlib_h.m4: Update.
2181         * gnulib/import/m4/strchrnul.m4: Update.
2182         * gnulib/import/m4/strdup.m4: Update.
2183         * gnulib/import/m4/strerror.m4: Update.
2184         * gnulib/import/m4/string_h.m4: Update.
2185         * gnulib/import/m4/strstr.m4: Update.
2186         * gnulib/import/m4/strtok_r.m4: Update.
2187         * gnulib/import/m4/sys_socket_h.m4: Update.
2188         * gnulib/import/m4/sys_stat_h.m4: Update.
2189         * gnulib/import/m4/sys_time_h.m4: Update.
2190         * gnulib/import/m4/sys_types_h.m4: Update.
2191         * gnulib/import/m4/tempname.m4: Update.
2192         * gnulib/import/m4/time_h.m4: Update.
2193         * gnulib/import/m4/unistd-safer.m4: Update.
2194         * gnulib/import/m4/unistd_h.m4: Update.
2195         * gnulib/import/m4/warn-on-use.m4: Update.
2196         * gnulib/import/m4/wchar_h.m4: Update.
2197         * gnulib/import/m4/wchar_t.m4: Update.
2198         * gnulib/import/m4/wctype_h.m4: Update.
2199         * gnulib/import/m4/wint_t.m4: Update.
2200         * gnulib/import/malloc.c: Update.
2201         * gnulib/import/malloc/scratch_buffer.h: Update.
2202         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2203         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2204         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2205         * gnulib/import/malloca.c: Update.
2206         * gnulib/import/malloca.h: Update.
2207         * gnulib/import/malloca.valgrind: Update.
2208         * gnulib/import/math.in.h: Update.
2209         * gnulib/import/mbrtowc.c: Update.
2210         * gnulib/import/mbsinit.c: Update.
2211         * gnulib/import/mbsrtowcs-impl.h: Update.
2212         * gnulib/import/mbsrtowcs-state.c: Update.
2213         * gnulib/import/mbsrtowcs.c: Update.
2214         * gnulib/import/memchr.c: Update.
2215         * gnulib/import/memmem.c: Update.
2216         * gnulib/import/mempcpy.c: Update.
2217         * gnulib/import/memrchr.c: Update.
2218         * gnulib/import/mkdir.c: Update.
2219         * gnulib/import/mkstemp.c: Update.
2220         * gnulib/import/msvc-inval.c: Update.
2221         * gnulib/import/msvc-inval.h: Update.
2222         * gnulib/import/msvc-nothrow.c: Update.
2223         * gnulib/import/msvc-nothrow.h: Update.
2224         * gnulib/import/open.c: Update.
2225         * gnulib/import/openat-die.c: Update.
2226         * gnulib/import/openat-priv.h: Update.
2227         * gnulib/import/openat-proc.c: Update.
2228         * gnulib/import/openat.c: Update.
2229         * gnulib/import/openat.h: Update.
2230         * gnulib/import/opendir.c: Update.
2231         * gnulib/import/pathmax.h: Update.
2232         * gnulib/import/pipe-safer.c: Update.
2233         * gnulib/import/rawmemchr.c: Update.
2234         * gnulib/import/readdir.c: Update.
2235         * gnulib/import/readlink.c: Update.
2236         * gnulib/import/realloc.c: Update.
2237         * gnulib/import/ref-add.sin: Update.
2238         * gnulib/import/ref-del.sin: Update.
2239         * gnulib/import/rename.c: Update.
2240         * gnulib/import/rewinddir.c: Update.
2241         * gnulib/import/rmdir.c: Update.
2242         * gnulib/import/same-inode.h: Update.
2243         * gnulib/import/save-cwd.c: Update.
2244         * gnulib/import/save-cwd.h: Update.
2245         * gnulib/import/scratch_buffer.h: Update.
2246         * gnulib/import/secure_getenv.c: Update.
2247         * gnulib/import/setenv.c: Update.
2248         * gnulib/import/signal.in.h: Update.
2249         * gnulib/import/stat-time.c: Update.
2250         * gnulib/import/stat-time.h: Update.
2251         * gnulib/import/stat-w32.c: Update.
2252         * gnulib/import/stat-w32.h: Update.
2253         * gnulib/import/stat.c: Update.
2254         * gnulib/import/stdbool.in.h: Update.
2255         * gnulib/import/stddef.in.h: Update.
2256         * gnulib/import/stdint.in.h: Update.
2257         * gnulib/import/stdio.in.h: Update.
2258         * gnulib/import/stdlib.in.h: Update.
2259         * gnulib/import/str-two-way.h: Update.
2260         * gnulib/import/strchrnul.c: Update.
2261         * gnulib/import/strdup.c: Update.
2262         * gnulib/import/streq.h: Update.
2263         * gnulib/import/strerror-override.c: Update.
2264         * gnulib/import/strerror-override.h: Update.
2265         * gnulib/import/strerror.c: Update.
2266         * gnulib/import/string.in.h: Update.
2267         * gnulib/import/stripslash.c: Update.
2268         * gnulib/import/strnlen1.c: Update.
2269         * gnulib/import/strnlen1.h: Update.
2270         * gnulib/import/strstr.c: Update.
2271         * gnulib/import/strtok_r.c: Update.
2272         * gnulib/import/sys_stat.in.h: Update.
2273         * gnulib/import/sys_time.in.h: Update.
2274         * gnulib/import/sys_types.in.h: Update.
2275         * gnulib/import/tempname.c: Update.
2276         * gnulib/import/tempname.h: Update.
2277         * gnulib/import/time.in.h: Update.
2278         * gnulib/import/unistd--.h: Update.
2279         * gnulib/import/unistd-safer.h: Update.
2280         * gnulib/import/unistd.in.h: Update.
2281         * gnulib/import/unsetenv.c: Update.
2282         * gnulib/import/verify.h: Update.
2283         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2284         * gnulib/import/wchar.in.h: Update.
2285         * gnulib/import/wctype.in.h: Update.
2286         * gnulib/import/xalloc-oversized.h: Update.
2287         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2288         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2289
2290 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2291
2292         * record-btrace.c (get_thread_current_frame): Remove
2293         old_inferior_ptid.
2294
2295 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2296
2297         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2298         with check_tag to 1 if and only if the type is tagged and the
2299         component being searched cannot been found in the current
2300         view. Otherwise, always call ada_to_fixed_type with
2301         check_tag to 0.
2302
2303 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2304
2305         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2306         declaration.
2307         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2308         * ada-varobj.c (ada_varobj_get_number_of_children,
2309         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2310
2311 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2312
2313         * ada-valprint.c (ada_value_print): Use type instead of
2314         enclosing type.
2315
2316 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2317
2318         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2319         an array of access to unconstrained array.
2320
2321 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2322
2323         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2324         (ada_check_typedef): Use it.
2325
2326 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2327
2328         * ada-varobj.c (ada_varobj_describe_struct_child)
2329         (ada_varobj_describe_child): Handle union case like struct one.
2330
2331 2018-09-10  Tom Tromey  <tom@tromey.com>
2332
2333         PR python/18380:
2334         * python/python.c (_initialize_python): Make example in "python"
2335         help work in Python 3.
2336
2337 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2338
2339         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2340         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2341         $(EXEEXT) to the script, as it is not a program.
2342
2343 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2344
2345         * python/py-prettyprint.c (pretty_print_one_value): Return
2346         gdbpy_ref<>.
2347         (print_string_repr): Adjust.
2348         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2349         * python/python-internal.h (apply_varobj_pretty_printer): Return
2350         gdbpy_ref<>.
2351         * varobj.c (varobj_value_get_print_value): Adjust.
2352
2353 2018-09-08  Tom Tromey  <tom@tromey.com>
2354
2355         PR python/16047:
2356         * python/py-prettyprint.c (pretty_print_one_value): Check for
2357         to_string method.
2358
2359 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2360
2361         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2362         replace_operator_with_call.
2363
2364 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2365
2366         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2367
2368 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2369
2370         * ada-typeprint.c (print_range): Print the bounds using TYPE
2371         rather than its TYPE_TARGET_TYPE.
2372
2373 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2374
2375         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2376         call to ada_to_fixed_value_create.
2377
2378 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2379
2380         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2381
2382 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2383
2384         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2385         by calls to error.
2386
2387 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2388
2389         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2390         Move update of loop variable "fi".
2391
2392 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2393
2394         * ada-lang.c (value_assign_to_component): In the case of
2395         big-endian targets, extract the bits of the given VAL
2396         using an src_offset of zero if container is not a scalar.
2397
2398 2018-09-06  Simon Ser  <contact@emersion.fr>
2399
2400         PR gdb/23105
2401         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2402         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2403         * fbsd-tdep.c (fbsd_make_note_desc): New.
2404         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2405         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2406         * target.h (enum target_object) Add FreeBSD-specific
2407         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2408
2409 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2410
2411         * compile/compile-c.h (generate_c_for_variable_locations):
2412         Change reference to pointer.
2413         * compile/compile-c-support.c (compile_program) <compute>:
2414         Likewise.
2415         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2416         (generate_c_for_for_one_variable): Likewise
2417         (generate_c_for_variable_locations): Likewise
2418         * compile/compile-c-types.c (compile_c_instance::convert_type):
2419         Likewise
2420         * compile/compile-cplus-symbols.c (convert_one_symbol):
2421         std::move the scope passed to enter_scope.
2422         * compile/compile-cplus-types.c
2423         (compile_cplus_instance::enter_scope): Make parameter
2424         rvalue-reference.
2425         (compile_cplus_instance::new_scope): Change reference to
2426         pointer.
2427         (compile_cplus_instance::convert_type): Likewise
2428         (compile_cplus_convert_typedef): std::move the scope passed to
2429         enter_scope.
2430         (compile_cplus_convert_struct_or_union): Likewise.
2431         (compile_cplus_convert_enum): Likewise.
2432         (compile_cplus_convert_namespace): Likewise.
2433         * compile/compile-cplus.h (compile_cplus_instance)
2434         <enter_scope>: Make parameter rvalue-reference.
2435         * compile/compile-internal.h (compile_instance)
2436         <get_cached_type>: Likewise
2437         * compile/compile-loc2c.c (push): Likewise
2438         (pushf): Likewise
2439         (unary): Likewise
2440         (binary): Likewise
2441         (print_label): Likewise
2442         (pushf_register_address): Likewise
2443         (pushf_register): Likewise
2444         (do_compile_dwarf_expr_to_c): Likewise
2445         (compile_dwarf_expr_to_c): Likewise
2446         (compile_dwarf_bounds_to_c): Likewise
2447         * compile/compile.c (compile_instance::get_cached_type):
2448         Likewise
2449         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2450         (compile_dwarf_bounds_to_c): Likewise
2451         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2452         (dwarf2_compile_property_to_c): Likewise
2453         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2454         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2455         Likewise
2456
2457 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2458
2459         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2460         * tui/tui-data.c (init_content_element): Don't initialize it.
2461
2462 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2463
2464         * tui/tui-data.h (struct tui_win_info)
2465         <detail::opaque>: Remove.
2466         * tui/tui-data.c (init_win_info): Remove assignment.
2467
2468 2018-09-05  Tom Tromey  <tom@tromey.com>
2469
2470         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2471         -Wformat-nonliteral.
2472         * target-float.c (host_float_ops<T>::to_string)
2473         (host_float_ops<T>::from_string): Use
2474         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2475         * configure: Rebuild.
2476
2477 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2478
2479         * printcmd.c (printf_c_string): Use
2480         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2481         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2482
2483 2018-09-05  Tom Tromey  <tom@tromey.com>
2484
2485         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2486
2487 2018-09-05  Tom de Vries  <tdevries@suse.de>
2488
2489         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2490         with resolve_abstract_p == true.
2491         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2492         defaulting to false. Propagate resolve_abstract_p to
2493         dwarf2_fetch_die_loc_sect_off.
2494         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2495         parameter, defaulting to false.
2496         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2497         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2498         parameter.
2499         * dwarf2read.h (struct die_info): Forward-declare.
2500         (die_info_ptr): New typedef.
2501         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2502
2503 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2504
2505         GDB 8.2 released.
2506
2507 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2508             Pedro Alves  <palves@redhat.com>
2509
2510         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2511         "aclocal-m4-deps.mk".  Include file here.
2512         $(srcdir)/aclocal.m4: Add "configure.ac".
2513         * gnulib/aclocal-m4-deps.mk: New file.
2514         * gnulib/update-gnulib.sh: Automatically update
2515         "aclocal-m4-deps.mk".
2516
2517 2018-09-04  Tom Tromey  <tom@tromey.com>
2518
2519         * configure: Rebuild.
2520         * configure.ac: Remove multi-ice code.
2521
2522 2018-09-04  Tom Tromey  <tom@tromey.com>
2523
2524         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2525         (ada-exp.o): Update.
2526
2527 2018-09-04  Tom Tromey  <tom@tromey.com>
2528
2529         * Makefile.in (printcmd.o, target-float.o): Remove.
2530         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2531
2532 2018-09-04  Tom Tromey  <tom@tromey.com>
2533
2534         * gnulib/Makefile.in: Remove obsolete comment.
2535         * Makefile.in: Remove obsolete comment.
2536
2537 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2538
2539         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2540         line with '+'.
2541
2542 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2543
2544         * riscv-tdep.c: Add 'prologue-value.h' include.
2545         (struct riscv_unwind_cache): New struct.
2546         (riscv_debug_unwinder): New global.
2547         (riscv_scan_prologue): Update arguments, capture register details
2548         from prologue scan.
2549         (riscv_skip_prologue): Reformat arguments line, move end of
2550         prologue calculation into riscv_scan_prologue.
2551         (riscv_frame_cache): Update return type, create
2552         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2553         details.
2554         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2555         (riscv_frame_prev_register): Use the trad_frame within the
2556         riscv_unwind_cache.
2557         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2558         flag.
2559
2560 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2561
2562         * trad-frame.h (trad_frame_set_realreg): Declare.
2563         (trad_frame_set_addr): Declare.
2564         * trad-frame.c (trad_frame_set_realreg): Define new function.
2565         (trad_frame_set_addr): Define new function.
2566         (trad_frame_set_reg_realreg): Use new function.
2567         (trad_frame_set_reg_addr): Use new function.
2568
2569 2018-09-01  Keith Seitz  <keiths@redhat.com>
2570
2571         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2572         pulongest instead of "%lld".
2573         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2574         ATTRIBUTE_UNUSED.
2575
2576 2018-08-31  Tom Tromey  <tom@tromey.com>
2577
2578         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2579         variant part type.
2580
2581 2018-08-31  Pedro Alves  <palves@redhat.com>
2582
2583         * gdbarch.h: Regenerate.
2584
2585 2018-08-31  Pedro Alves  <palves@redhat.com>
2586
2587         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2588         * target.h (Hardware watchpoint interfaces): Describe
2589         continuable/steppable/non-steppable watchpoints.
2590         * gdbarch.h, gdbarch.c: Regenerate.
2591
2592 2018-08-31  Pedro Alves  <palves@redhat.com>
2593
2594         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2595         Delete.
2596         * s390-linux-nat.c
2597         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2598         * target.h (target_ops::have_continuable_watchpoint): Delete.
2599         (target_have_continuable_watchpoint): Delete.
2600         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2601         * target-delegates.c: Regenerate.
2602
2603 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2604
2605         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2606         the files present in "gnulib/import/m4/".
2607
2608 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2609
2610         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2611         c.sw, c.swsp, and c.sdsp.
2612
2613 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2614
2615         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2616         (riscv_read_misa_reg): Don't cache value read into inferior data.
2617         (riscv_new_inferior_data): Delete.
2618         (riscv_inferior_data_cleanup): Delete.
2619         (riscv_inferior_data): Delete.
2620         (riscv_invalidate_inferior_data): Delete.
2621         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2622
2623 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2624
2625         * compile/compile-cplus-types.c
2626         (compile_cplus_instance::leave_scope): Take the address of scope
2627         object.
2628         (compile_cplus_instance::convert_qualified_base): Compare quals
2629         to 0.
2630
2631 2018-08-30  Keith Seitz  <keiths@redhat.com>
2632
2633         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2634         Use "%s" and host_address_to_string instead of "%p" in printf.
2635
2636 2018-08-29  Keith Seitz  <keiths@redhat.com>
2637
2638         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2639         and compile-cplus-types.c.
2640         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2641         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2642         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2643         Declare.
2644         * compile/compile-c-support.c: Include compile-cplus.h.
2645         (load_libcompile): Templatize.
2646         (get_compile_context): "New" function.
2647         (c_get_compile_context): Use get_compile_context.
2648         (cplus_get_compile_context): New function.
2649         (cplus_push_user_expression, cplus_pop_user_expression)
2650         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2651         (cplus_compute_program): Define new structs/functions.
2652         * compile/compile-cplus-symmbols.c: New file.
2653         * compile/compile-cplus-types.c: New file.
2654         * compile/compile-cplus.h: New file.
2655         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2656         Declare.
2657         * compile/compile-object-load.c (get_out_value_type): Use
2658         strncmp_iw when comparing symbol names.
2659         (compile_object_load): Add mst_bss and mst_data.
2660         * compile/compile.c (_initialize_compile): Remove
2661         -Wno-implicit-function-declaration from `compile_args'.
2662         * compile/gcc-cp-plugin.h: New file.
2663         * NEWS: Mention C++ compile support and new debug options.
2664
2665 2018-08-29  Keith Seitz  <keiths@redhat.com>
2666
2667         * linespec.c (collect_info::add_symbol): Make virtual.
2668         (struct symbol_searcher_collect_info): New struct.
2669         (symbol_searcher::find_all_symbols): New method.
2670         * symtab.h (class symbol_searcher): New class.
2671
2672 2018-08-29  Keith Seitz  <keiths@redhat.com>
2673
2674         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2675         Change to vector of block_symbol.  Update all users.
2676         (struct collect_info) <symbols>: Likewise.
2677         (collect_info::add_symbol): Take block_symbol as argument.
2678         Update all callers.
2679         (decode_compound_collector) <m_symbols>: Change type to vector
2680         of block_symbol.  Update all users.
2681         (decode_compound_collector::operator ()): Change parameter type
2682         to block_symbol.
2683         (find_method, find_function_symbols, find_linespec_symbols)
2684         (find_label_symbols_in_block, find_label_symbols): Change symbol
2685         vectors to block_symbol vectors.
2686         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2687         block_symbol.
2688
2689 2018-08-29  Keith Seitz  <keiths@redhat.com>
2690
2691         * linespec.c (symbolp): Remove typedef and VEC definitions.
2692         (bound_minimal_symbol_d): Likewise.
2693
2694 2018-08-29  Keith Seitz  <keiths@redhat.com>
2695
2696         * linespec.c (decode_compound_collector::decode_compound_collector):
2697         Remove initialization for `m_symtabs'.
2698         (decode_compound_collector::release_symbols): Change return type
2699         to std::vector.  Update all callers.
2700         (class decode_compound_collector) <m_symbols>: Change type to
2701         std::vector.
2702         (lookup_prefix_sym): Change return type to std::vector.  Update all
2703         callers.
2704         (compare_symbols): Remove.
2705         (std_compare_symbols): Rename to `compare_symbols'.
2706         (find_method): Change `sym_classes' parameter to std::vector.
2707         Update all callers.  Use std::sort to sort sym_classes.
2708         (find_linespec_symbols): Remove cleanup.
2709
2710 2018-08-29  Keith Seitz  <keiths@redhat.com>
2711
2712         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2713         std::vector.  Update all users.
2714         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2715         (struct collect_info) <minimal_symbols>: Likewise.
2716         (compare_msymbols): Return bool.  Change parameters to const
2717         bound_minimal_symbol references.
2718         (find_method, find_function_symbols, find_linespec_symbols): Change
2719         `minsyms' parameter to std::vector.  Update all callers.
2720
2721 2018-08-29  Keith Seitz  <keiths@redhat.com>
2722
2723         * linespec.c (struct linespec) <label_symbols>: Change type to
2724         std::vector.  Update all users.
2725         (find_label_symbols_in_block): Change `result' parameter to
2726         std::vector.  Update all callers.
2727         (find_label_symbols): Return std::vector.  Update all callers.
2728
2729 2018-08-29  Keith Seitz  <keiths@redhat.com>
2730
2731         * linespec.c (struct linespec) <function_symbols>: Change type to
2732         std::vector.  Update all users.
2733         (struct collect_info) <function_symbols>: Likewise.
2734         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2735         (std_compare_symbols): New function.
2736         (find_method, find_function_symbols, find_linespec_symbols)
2737         (find_label_symbols_in_block): Change `symbols' parameter to
2738         std::vector.  Update all callers.
2739         (find_label_symbols): Likewise for `function_symbols' and
2740         `label_funcs_ret'.
2741
2742 2018-08-29  Keith Seitz  <keiths@redhat.com>
2743
2744         * linespec.c (symtab_vector_up): Define.
2745         (struct linespec) <file_symtabs>: Change type to std::vector *.
2746         Update all uses.
2747         (struct collect_info) <file_symtabs>: Likewise.
2748         (collect_symtabs_from_filename): Return symtab_vector_up.
2749         Update all callers.
2750         (decode_objc): Remove cleanup.
2751         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2752         (symtab_collector::release_symtabs): Return symtab_vector_up.
2753         Update all callers.
2754         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2755         Update all users.
2756         (collect_symtabs_from_filename, symtabs_from_filename): Return
2757         symtab_vector_up.  Update all callers.
2758
2759 2018-08-29  Tom Tromey  <tom@tromey.com>
2760
2761         * csky-tdep.c (csky_analyze_prologue): Use
2762         core_addr_to_string_nz.
2763
2764 2018-08-29  Tom Tromey  <tom@tromey.com>
2765
2766         * windows-nat.c (struct xlate_exception) <them>: Change type to
2767         DWORD.
2768         (xlate): Fix formatting.  Remove last entry.
2769         (struct xlate_exception, xlate): Comment out.
2770         (windows_nat_target::resume): Use ranged for.
2771
2772 2018-08-29  Jim Wilson  <jimw@sifive.com>
2773
2774         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2775         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2776         of NT_PRFPREG.
2777         (riscv_linux_nat_target::store_registers): Likewise.
2778
2779 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2780
2781         PR gdb/23555
2782         PR gdb/23558
2783         * gnulib/aclocal.m4: Regenerate.
2784         * gnulib/config.in: Regenerate.
2785         * gnulib/configure: Regenerate.
2786         * gnulib/import/Makefile.am: Update.
2787         * gnulib/import/Makefile.in: Update.
2788         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2789         * gnulib/import/_Noreturn.h: ... this.
2790         * gnulib/import/alloca.in.h: Update.
2791         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2792         * gnulib/import/arg-nonnull.h: ... this.
2793         * gnulib/import/assure.h: Update.
2794         * gnulib/import/at-func.c: Update.
2795         * gnulib/import/basename-lgpl.c: Update.
2796         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2797         * gnulib/import/c++defs.h: ... this.
2798         * gnulib/import/canonicalize-lgpl.c: Update.
2799         * gnulib/import/cdefs.h: Update.
2800         * gnulib/import/chdir-long.c: Update.
2801         * gnulib/import/chdir-long.h: Update.
2802         * gnulib/import/cloexec.c: Update.
2803         * gnulib/import/cloexec.h: Update.
2804         * gnulib/import/close.c: Update.
2805         * gnulib/import/closedir.c: Update.
2806         * gnulib/import/config.charset: Update.
2807         * gnulib/import/dirent-private.h: Update.
2808         * gnulib/import/dirent.in.h: Update.
2809         * gnulib/import/dirfd.c: Update.
2810         * gnulib/import/dirname-lgpl.c: Update.
2811         * gnulib/import/dirname.h: Update.
2812         * gnulib/import/dosname.h: Update.
2813         * gnulib/import/dup-safer-flag.c: Update.
2814         * gnulib/import/dup-safer.c: Update.
2815         * gnulib/import/dup.c: Update.
2816         * gnulib/import/dup2.c: Update.
2817         * gnulib/import/errno.in.h: Update.
2818         * gnulib/import/error.c: Update.
2819         * gnulib/import/error.h: Update.
2820         * gnulib/import/exitfail.c: Update.
2821         * gnulib/import/exitfail.h: Update.
2822         * gnulib/import/extra/update-copyright: Update.
2823         * gnulib/import/fchdir.c: Update.
2824         * gnulib/import/fcntl.c: Update.
2825         * gnulib/import/fcntl.in.h: Update.
2826         * gnulib/import/fd-hook.c: Update.
2827         * gnulib/import/fd-hook.h: Update.
2828         * gnulib/import/fd-safer-flag.c: Update.
2829         * gnulib/import/fd-safer.c: Update.
2830         * gnulib/import/fdopendir.c: Update.
2831         * gnulib/import/filename.h: Update.
2832         * gnulib/import/filenamecat-lgpl.c: Update.
2833         * gnulib/import/filenamecat.h: Update.
2834         * gnulib/import/flexmember.h: Update.
2835         * gnulib/import/float+.h: Update.
2836         * gnulib/import/float.c: Update.
2837         * gnulib/import/float.in.h: Update.
2838         * gnulib/import/fnmatch.c: Update.
2839         * gnulib/import/fnmatch.in.h: Update.
2840         * gnulib/import/fnmatch_loop.c: Update.
2841         * gnulib/import/fpucw.h: Update.
2842         * gnulib/import/frexp.c: Update.
2843         * gnulib/import/frexpl.c: Update.
2844         * gnulib/import/fstat.c: Update.
2845         * gnulib/import/fstatat.c: Update.
2846         * gnulib/import/getcwd-lgpl.c: Update.
2847         * gnulib/import/getcwd.c: Update.
2848         * gnulib/import/getdtablesize.c: Update.
2849         * gnulib/import/getlogin_r.c: Update.
2850         * gnulib/import/getprogname.c: Update.
2851         * gnulib/import/getprogname.h: Update.
2852         * gnulib/import/gettext.h: Update.
2853         * gnulib/import/gettimeofday.c: Update.
2854         * gnulib/import/glob-libc.h: Update.
2855         * gnulib/import/glob.c: Update.
2856         * gnulib/import/glob.in.h: Update.
2857         * gnulib/import/glob_internal.h: Update.
2858         * gnulib/import/glob_pattern_p.c: Update.
2859         * gnulib/import/globfree.c: Update.
2860         * gnulib/import/hard-locale.c: Update.
2861         * gnulib/import/hard-locale.h: Update.
2862         * gnulib/import/intprops.h: Update.
2863         * gnulib/import/inttypes.in.h: Update.
2864         * gnulib/import/isnan.c: Update.
2865         * gnulib/import/isnand-nolibm.h: Update.
2866         * gnulib/import/isnand.c: Update.
2867         * gnulib/import/isnanl-nolibm.h: Update.
2868         * gnulib/import/isnanl.c: Update.
2869         * gnulib/import/itold.c: Update.
2870         * gnulib/import/libc-config.h: Update.
2871         * gnulib/import/limits.in.h: Update.
2872         * gnulib/import/localcharset.c: Update.
2873         * gnulib/import/localcharset.h: Update.
2874         * gnulib/import/localtime-buffer.c: Update.
2875         * gnulib/import/localtime-buffer.h: Update.
2876         * gnulib/import/lstat.c: Update.
2877         * gnulib/import/m4/00gnulib.m4: Update.
2878         * gnulib/import/m4/__inline.m4: Update.
2879         * gnulib/import/m4/absolute-header.m4: Update.
2880         * gnulib/import/m4/alloca.m4: Update.
2881         * gnulib/import/m4/builtin-expect.m4: Update.
2882         * gnulib/import/m4/canonicalize.m4: Update.
2883         * gnulib/import/m4/chdir-long.m4: Update.
2884         * gnulib/import/m4/close.m4: Update.
2885         * gnulib/import/m4/closedir.m4: Update.
2886         * gnulib/import/m4/configmake.m4: Update.
2887         * gnulib/import/m4/d-ino.m4: Update.
2888         * gnulib/import/m4/d-type.m4: Update.
2889         * gnulib/import/m4/dirent_h.m4: Update.
2890         * gnulib/import/m4/dirfd.m4: Update.
2891         * gnulib/import/m4/dirname.m4: Update.
2892         * gnulib/import/m4/double-slash-root.m4: Update.
2893         * gnulib/import/m4/dup.m4: Update.
2894         * gnulib/import/m4/dup2.m4: Update.
2895         * gnulib/import/m4/eealloc.m4: Update.
2896         * gnulib/import/m4/environ.m4: Update.
2897         * gnulib/import/m4/errno_h.m4: Update.
2898         * gnulib/import/m4/error.m4: Update.
2899         * gnulib/import/m4/exponentd.m4: Update.
2900         * gnulib/import/m4/exponentl.m4: Update.
2901         * gnulib/import/m4/extensions.m4: Update.
2902         * gnulib/import/m4/extern-inline.m4: Update.
2903         * gnulib/import/m4/fchdir.m4: Update.
2904         * gnulib/import/m4/fcntl-o.m4: Update.
2905         * gnulib/import/m4/fcntl.m4: Update.
2906         * gnulib/import/m4/fcntl_h.m4: Update.
2907         * gnulib/import/m4/fdopendir.m4: Update.
2908         * gnulib/import/m4/filenamecat.m4: Update.
2909         * gnulib/import/m4/flexmember.m4: Update.
2910         * gnulib/import/m4/float_h.m4: Update.
2911         * gnulib/import/m4/fnmatch.m4: Update.
2912         * gnulib/import/m4/fnmatch_h.m4: Update.
2913         * gnulib/import/m4/fpieee.m4: Update.
2914         * gnulib/import/m4/frexp.m4: Update.
2915         * gnulib/import/m4/frexpl.m4: Update.
2916         * gnulib/import/m4/fstat.m4: Update.
2917         * gnulib/import/m4/fstatat.m4: Update.
2918         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2919         * gnulib/import/m4/getcwd-path-max.m4: Update.
2920         * gnulib/import/m4/getcwd.m4: Update.
2921         * gnulib/import/m4/getdtablesize.m4: Update.
2922         * gnulib/import/m4/getlogin.m4: Update.
2923         * gnulib/import/m4/getlogin_r.m4: Update.
2924         * gnulib/import/m4/getpagesize.m4: Update.
2925         * gnulib/import/m4/getprogname.m4: Update.
2926         * gnulib/import/m4/gettimeofday.m4: Update.
2927         * gnulib/import/m4/glibc21.m4: Update.
2928         * gnulib/import/m4/glob.m4: Update.
2929         * gnulib/import/m4/glob_h.m4: Update.
2930         * gnulib/import/m4/gnulib-cache.m4: Update.
2931         * gnulib/import/m4/gnulib-common.m4: Update.
2932         * gnulib/import/m4/gnulib-comp.m4: Update.
2933         * gnulib/import/m4/gnulib-tool.m4: Update.
2934         * gnulib/import/m4/hard-locale.m4: Update.
2935         * gnulib/import/m4/include_next.m4: Update.
2936         * gnulib/import/m4/inttypes-pri.m4: Update.
2937         * gnulib/import/m4/inttypes.m4: Update.
2938         * gnulib/import/m4/isnand.m4: Update.
2939         * gnulib/import/m4/isnanl.m4: Update.
2940         * gnulib/import/m4/largefile.m4: Update.
2941         * gnulib/import/m4/limits-h.m4: Update.
2942         * gnulib/import/m4/localcharset.m4: Update.
2943         * gnulib/import/m4/locale-fr.m4: Update.
2944         * gnulib/import/m4/locale-ja.m4: Update.
2945         * gnulib/import/m4/locale-zh.m4: Update.
2946         * gnulib/import/m4/localtime-buffer.m4: Update.
2947         * gnulib/import/m4/longlong.m4: Update.
2948         * gnulib/import/m4/lstat.m4: Update.
2949         * gnulib/import/m4/malloc.m4: Update.
2950         * gnulib/import/m4/malloca.m4: Update.
2951         * gnulib/import/m4/math_h.m4: Update.
2952         * gnulib/import/m4/mbrtowc.m4: Update.
2953         * gnulib/import/m4/mbsinit.m4: Update.
2954         * gnulib/import/m4/mbsrtowcs.m4: Update.
2955         * gnulib/import/m4/mbstate_t.m4: Update.
2956         * gnulib/import/m4/memchr.m4: Update.
2957         * gnulib/import/m4/memmem.m4: Update.
2958         * gnulib/import/m4/mempcpy.m4: Update.
2959         * gnulib/import/m4/memrchr.m4: Update.
2960         * gnulib/import/m4/mkdir.m4: Update.
2961         * gnulib/import/m4/mkstemp.m4: Update.
2962         * gnulib/import/m4/mmap-anon.m4: Update.
2963         * gnulib/import/m4/mode_t.m4: Update.
2964         * gnulib/import/m4/msvc-inval.m4: Update.
2965         * gnulib/import/m4/msvc-nothrow.m4: Update.
2966         * gnulib/import/m4/multiarch.m4: Update.
2967         * gnulib/import/m4/nocrash.m4: Update.
2968         * gnulib/import/m4/off_t.m4: Update.
2969         * gnulib/import/m4/onceonly.m4: Update.
2970         * gnulib/import/m4/open-cloexec.m4: Update.
2971         * gnulib/import/m4/open.m4: Update.
2972         * gnulib/import/m4/openat.m4: Update.
2973         * gnulib/import/m4/opendir.m4: Update.
2974         * gnulib/import/m4/pathmax.m4: Update.
2975         * gnulib/import/m4/rawmemchr.m4: Update.
2976         * gnulib/import/m4/readdir.m4: Update.
2977         * gnulib/import/m4/readlink.m4: Update.
2978         * gnulib/import/m4/realloc.m4: Update.
2979         * gnulib/import/m4/rename.m4: Update.
2980         * gnulib/import/m4/rewinddir.m4: Update.
2981         * gnulib/import/m4/rmdir.m4: Update.
2982         * gnulib/import/m4/save-cwd.m4: Update.
2983         * gnulib/import/m4/secure_getenv.m4: Update.
2984         * gnulib/import/m4/setenv.m4: Update.
2985         * gnulib/import/m4/signal_h.m4: Update.
2986         * gnulib/import/m4/ssize_t.m4: Update.
2987         * gnulib/import/m4/stat-time.m4: Update.
2988         * gnulib/import/m4/stat.m4: Update.
2989         * gnulib/import/m4/std-gnu11.m4: Update.
2990         * gnulib/import/m4/stdbool.m4: Update.
2991         * gnulib/import/m4/stddef_h.m4: Update.
2992         * gnulib/import/m4/stdint.m4: Update.
2993         * gnulib/import/m4/stdio_h.m4: Update.
2994         * gnulib/import/m4/stdlib_h.m4: Update.
2995         * gnulib/import/m4/strchrnul.m4: Update.
2996         * gnulib/import/m4/strdup.m4: Update.
2997         * gnulib/import/m4/strerror.m4: Update.
2998         * gnulib/import/m4/string_h.m4: Update.
2999         * gnulib/import/m4/strstr.m4: Update.
3000         * gnulib/import/m4/strtok_r.m4: Update.
3001         * gnulib/import/m4/sys_socket_h.m4: Update.
3002         * gnulib/import/m4/sys_stat_h.m4: Update.
3003         * gnulib/import/m4/sys_time_h.m4: Update.
3004         * gnulib/import/m4/sys_types_h.m4: Update.
3005         * gnulib/import/m4/tempname.m4: Update.
3006         * gnulib/import/m4/time_h.m4: Update.
3007         * gnulib/import/m4/unistd-safer.m4: Update.
3008         * gnulib/import/m4/unistd_h.m4: Update.
3009         * gnulib/import/m4/warn-on-use.m4: Update.
3010         * gnulib/import/m4/wchar_h.m4: Update.
3011         * gnulib/import/m4/wchar_t.m4: Update.
3012         * gnulib/import/m4/wctype_h.m4: Update.
3013         * gnulib/import/m4/wint_t.m4: Update.
3014         * gnulib/import/malloc.c: Update.
3015         * gnulib/import/malloc/scratch_buffer.h: Update.
3016         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3017         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3018         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3019         * gnulib/import/malloca.c: Update.
3020         * gnulib/import/malloca.h: Update.
3021         * gnulib/import/malloca.valgrind: Update.
3022         * gnulib/import/math.in.h: Update.
3023         * gnulib/import/mbrtowc.c: Update.
3024         * gnulib/import/mbsinit.c: Update.
3025         * gnulib/import/mbsrtowcs-impl.h: Update.
3026         * gnulib/import/mbsrtowcs-state.c: Update.
3027         * gnulib/import/mbsrtowcs.c: Update.
3028         * gnulib/import/memchr.c: Update.
3029         * gnulib/import/memmem.c: Update.
3030         * gnulib/import/mempcpy.c: Update.
3031         * gnulib/import/memrchr.c: Update.
3032         * gnulib/import/mkdir.c: Update.
3033         * gnulib/import/mkstemp.c: Update.
3034         * gnulib/import/msvc-inval.c: Update.
3035         * gnulib/import/msvc-inval.h: Update.
3036         * gnulib/import/msvc-nothrow.c: Update.
3037         * gnulib/import/msvc-nothrow.h: Update.
3038         * gnulib/import/open.c: Update.
3039         * gnulib/import/openat-die.c: Update.
3040         * gnulib/import/openat-priv.h: Update.
3041         * gnulib/import/openat-proc.c: Update.
3042         * gnulib/import/openat.c: Update.
3043         * gnulib/import/openat.h: Update.
3044         * gnulib/import/opendir.c: Update.
3045         * gnulib/import/pathmax.h: Update.
3046         * gnulib/import/pipe-safer.c: Update.
3047         * gnulib/import/rawmemchr.c: Update.
3048         * gnulib/import/readdir.c: Update.
3049         * gnulib/import/readlink.c: Update.
3050         * gnulib/import/realloc.c: Update.
3051         * gnulib/import/ref-add.sin: Update.
3052         * gnulib/import/ref-del.sin: Update.
3053         * gnulib/import/rename.c: Update.
3054         * gnulib/import/rewinddir.c: Update.
3055         * gnulib/import/rmdir.c: Update.
3056         * gnulib/import/same-inode.h: Update.
3057         * gnulib/import/save-cwd.c: Update.
3058         * gnulib/import/save-cwd.h: Update.
3059         * gnulib/import/scratch_buffer.h: Update.
3060         * gnulib/import/secure_getenv.c: Update.
3061         * gnulib/import/setenv.c: Update.
3062         * gnulib/import/signal.in.h: Update.
3063         * gnulib/import/stat-time.c: Update.
3064         * gnulib/import/stat-time.h: Update.
3065         * gnulib/import/stat-w32.c: Update.
3066         * gnulib/import/stat-w32.h: Update.
3067         * gnulib/import/stat.c: Update.
3068         * gnulib/import/stdbool.in.h: Update.
3069         * gnulib/import/stddef.in.h: Update.
3070         * gnulib/import/stdint.in.h: Update.
3071         * gnulib/import/stdio.in.h: Update.
3072         * gnulib/import/stdlib.in.h: Update.
3073         * gnulib/import/str-two-way.h: Update.
3074         * gnulib/import/strchrnul.c: Update.
3075         * gnulib/import/strdup.c: Update.
3076         * gnulib/import/streq.h: Update.
3077         * gnulib/import/strerror-override.c: Update.
3078         * gnulib/import/strerror-override.h: Update.
3079         * gnulib/import/strerror.c: Update.
3080         * gnulib/import/string.in.h: Update.
3081         * gnulib/import/stripslash.c: Update.
3082         * gnulib/import/strnlen1.c: Update.
3083         * gnulib/import/strnlen1.h: Update.
3084         * gnulib/import/strstr.c: Update.
3085         * gnulib/import/strtok_r.c: Update.
3086         * gnulib/import/sys_stat.in.h: Update.
3087         * gnulib/import/sys_time.in.h: Update.
3088         * gnulib/import/sys_types.in.h: Update.
3089         * gnulib/import/tempname.c: Update.
3090         * gnulib/import/tempname.h: Update.
3091         * gnulib/import/time.in.h: Update.
3092         * gnulib/import/unistd--.h: Update.
3093         * gnulib/import/unistd-safer.h: Update.
3094         * gnulib/import/unistd.in.h: Update.
3095         * gnulib/import/unsetenv.c: Update.
3096         * gnulib/import/verify.h: Update.
3097         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3098         * gnulib/import/wchar.in.h: Update.
3099         * gnulib/import/wctype.in.h: Update.
3100         * gnulib/import/xalloc-oversized.h: Update.
3101         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3102         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3103
3104 2018-08-16  Gary Benson <gbenson@redhat.com>
3105
3106         PR gdb/13000:
3107         * gdb/main.c (captured_main_1): Exit with nonzero status
3108         in batch mode if the last command to be executed failed.
3109         * NEWS: Mention the above.
3110
3111 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3112
3113         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3114         end of warning message.
3115
3116 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3117
3118         PR gdb/22943:
3119         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3120         (aarch64_extract_return_value): Use
3121         aapcs_is_vfp_call_or_return_candidate.
3122         (aarch64_return_in_memory): Likewise.
3123         (aarch64_store_return_value): Likewise.
3124
3125 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3126
3127         * aarch64-tdep.c
3128         (aapcs_is_vfp_call_or_return_candidate): Make static
3129         (pass_in_v_or_stack): Remove function.
3130         (pass_in_v_vfp_candidate): New function.
3131         (aarch64_push_dummy_call): Check for float register candidates.
3132
3133 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3134
3135         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3136         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3137         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3138
3139 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3140
3141         PR build/23399
3142         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3143         (struct ipa_sym_addresses): Rename to...
3144         (struct ipa_sym_addresses_common): ... this.
3145         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3146
3147 2018-08-28  Tom Tromey  <tom@tromey.com>
3148
3149         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3150         (token_fifo): Now a std::vector.
3151         (yylex, c_parse): Update.
3152         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3153         (token_fifo): Now a std::vector.
3154         (yylex, d_parse): Update.
3155         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3156         (token_fifo): Now a std::vector.
3157         (yylex, go_parse): Update.
3158
3159 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3160
3161         * parser-defs.h (struct type_stack) <elements>: Change type to
3162         std::vector<union type_stack_elt>.
3163         <depth, size>: Remove.
3164         * parse.c (parse_exp_in_context_1): Adjust.
3165         (type_stack_reserve): Remove.
3166         (check_type_stack_depth): Remove.
3167         (insert_into_type_stack): Adjust to std::vector.
3168         (insert_type): Likewise.
3169         (push_type): Likewise.
3170         (push_type_int): Likewise.
3171         (insert_type_address_space): Likewise.
3172         (pop_type): Likewise.
3173         (pop_type_int): Likewise.
3174         (pop_typelist): Likewise.
3175         (pop_type_stack): Likewise.
3176         (append_type_stack): Likewise.
3177         (push_type_stack): Likewise.
3178         (get_type_stack): Likewise.
3179         (type_stack_cleanup): Likewise.
3180         (push_typelist): Likewise.
3181         (follow_types): Likewise.
3182         (_initialize_parse): Likewise.
3183
3184 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3185
3186         * NEWS: Mention csky target.
3187
3188 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3189             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3190             Don Breazeal  <donb@codesourcery.com>
3191
3192         * csky-linux-tdep.c: New file.
3193         * csky-tdep.c: Likewise.
3194         * csky-tdep.h: Likewise.
3195         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3196         csky-tdep.o.
3197         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3198         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3199         * configure.tgt: Add csky support.
3200
3201 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3202
3203         * python/py-framefilter.c (py_print_frame): Print frame architecture
3204         when printing on an MI output.
3205
3206 2018-08-27  Tom Tromey  <tom@tromey.com>
3207
3208         PR build/23087:
3209         * configure: Rebuild.
3210         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3211
3212 2018-08-27  Tom Tromey  <tom@tromey.com>
3213
3214         * aarch64-linux-tdep.c
3215         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3216         casts to int.
3217
3218 2018-08-27  Tom Tromey  <tom@tromey.com>
3219
3220         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3221         unsigned.
3222         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3223         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3224         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3225         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3226         unsigned.
3227
3228 2018-08-27  Tom Tromey  <tom@tromey.com>
3229
3230         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3231         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3232
3233 2018-08-27  Tom Tromey  <tom@tromey.com>
3234
3235         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3236         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3237         ULONGEST_MAX.
3238         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3239         ULONGEST_MAX.
3240         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3241         ULONGEST_MAX.
3242         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3243         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3244         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3245         ULONGEST_MAX.
3246         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3247         (ppc64_linux_sigaction_tramp_frame)
3248         (ppc32_linux_sighandler_tramp_frame)
3249         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3250         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3251         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3252         * mn10300-linux-tdep.c (am33_linux_sigframe)
3253         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3254         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3255         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3256         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3257         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3258         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3259         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3260         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3261         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3262         * microblaze-linux-tdep.c
3263         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3264         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3265         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3266         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3267         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3268         * common/common-types.h (ULONGEST_MAX): New define.
3269         (CORE_ADDR_MAX): Fix formatting.
3270         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3271         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3272         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3273         (arm_linux_rt_sigreturn_tramp_frame)
3274         (arm_eabi_linux_sigreturn_tramp_frame)
3275         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3276         (thumb2_eabi_linux_sigreturn_tramp_frame)
3277         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3278         (arm_linux_restart_syscall_tramp_frame)
3279         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3280         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3281         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3282         ULONGEST_MAX.
3283         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3284
3285 2018-08-27  Tom Tromey  <tom@tromey.com>
3286
3287         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3288         CORE_ADDR_MAX.
3289         * mips-tdep.c (mips_deal_with_atomic_sequence)
3290         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3291         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3292         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3293         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3294         CORE_ADDR_MAX.
3295         * aarch64-tdep.c (aarch64_software_single_step): Use
3296         CORE_ADDR_MAX.
3297
3298 2018-08-27  Tom Tromey  <tom@tromey.com>
3299
3300         * linespec.c (complete_linespec_component): Add cast to "char".
3301         * completer.c (completion_tracker::build_completion_result): Add
3302         cast to "char".
3303
3304 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3305
3306         * solist.h (struct solist, struct target_so_ops): Fix
3307         indentation.
3308
3309 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3310
3311         * ada-tasks.c (ada_task_info_s): Remove typedef.
3312         (DEF_VEC_O(ada_task_info_s)): Remove.
3313         (struct ada_tasks_inferior_data): Initialize fields.
3314         <task_list>: Make an std::vector.
3315         (get_ada_tasks_inferior_data): Allocate with new.
3316         (ada_get_task_number): Adjust.
3317         (get_task_number_from_id): Likewise.
3318         (valid_task_id): Likewise.
3319         (ada_get_task_info_from_ptid): Likewise.
3320         (iterate_over_live_ada_tasks): Likewise.
3321         (add_ada_task): Likewise.
3322         (read_known_tasks): Likewise.
3323         (ada_build_task_list): Likewise.
3324         (print_ada_task_info): Likewise.
3325         (info_task): Likewise.
3326         (task_command_1): Likewise.
3327
3328 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3329
3330         * ada-lang.c (add_angle_brackets): Return std::string.
3331
3332 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3333
3334         * python/py-threadevent.c (py_get_event_thread): Initialize
3335         pythread.
3336
3337 2018-08-24  Pedro Alves  <palves@redhat.com>
3338
3339         * python/py-bpevent.c (create_breakpoint_event_object): Use
3340         copy-initialization.
3341         * python/py-continueevent.c (emit_continue_event): Use
3342         copy-initialization.
3343         * python/py-exitedevent.c (create_exited_event_object): Return a
3344         gdbpy_ref<>.
3345         (emit_exited_event): Use copy-initialization.
3346         * python/py-inferior.c (python_new_inferior)
3347         (python_inferior_deleted, add_thread_object): Use
3348         copy-initialization.
3349         * python/py-infevents.c (create_inferior_call_event_object)
3350         (create_register_changed_event_object)
3351         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3352         (emit_inferior_call_event, emit_memory_changed_event)
3353         (emit_register_changed_event): Use copy-initialization.
3354         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3355         Return a gdbpy_ref<>.
3356         (emit_new_objfile_event): Use copy-initialization.
3357         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3358         (emit_clear_objfiles_event): Use copy-initialization.
3359         * python/py-signalevent.c (create_signal_event_object): Use
3360         copy-initialization.
3361         * python/py-threadevent.c (create_thread_event_object): Use
3362         copy-initialization.
3363
3364 2018-08-24  Pedro Alves  <palves@redhat.com>
3365             Simon Marchi  <simon.marchi@ericsson.com>
3366
3367         PR gdb/23379
3368         * python/py-continueevent.c: Include "gdbthread.h".
3369         (create_continue_event_object): Add intro comment.  Add 'ptid'
3370         parameter.  Use it to find thread to pass to
3371         create_thread_event_object.
3372         (emit_continue_event): Pass PTID down to
3373         create_continue_event_object.
3374         * python/py-event.h (py_get_event_thread): Declare.
3375         (create_thread_event_object): Remove default from 'thread'
3376         parameter.
3377         * python/py-stopevent.c (create_stop_event_object): Use
3378         py_get_event_thread.
3379         * python/py-threadevent.c (get_event_thread): Rename to ...
3380         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3381         and use it to find the thread.
3382         (create_thread_event_object): Assert that THREAD isn't null.
3383         Don't find the event thread here.
3384
3385 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3386
3387         * block.h (blockrange, blockranges): New struct declarations.
3388         (struct block): Add new field named `ranges'.
3389         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3390         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3391         macros for accessing ranges in struct block.
3392         (make_blockranges): New declaration.
3393         block.c (make_blockranges): New function.
3394         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3395         for block.
3396         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3397         * blockframe.c (cache_pc_function_block): New static global.
3398         (clear_pc_function_cache): Clear cache_pc_function_block.
3399         (find_pc_partial_function): Move comment to symtab.h.  Add
3400         support for non-contiguous blocks.
3401         * cli/cli-cmds.c (block.h): Include.
3402         (print_disassembly): Handle printing of non-contiguous blocks.
3403         (disassemble_current_function): Likewise.
3404         (disassemble_command): Likewise.
3405
3406         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3407         BLOCK_START.
3408         * blockframe.c (get_pc_function_start): Likewise.
3409         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3410         (gcc_symbol_address): Likewise.
3411         * compile/compile-object-run.c (compile_object_run): Likewise.
3412         * compile/compile.c (get_expr_block_and_pc): Likewise.
3413         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3414         (func_addr_to_tail_call_list): Likewise.
3415         * findvar.c (default_read_var_value): Likewise.
3416         * inline-frame.c (inline_frame_this_id): Likewise.
3417         (skip-inline_frames): Likewise.
3418         * infcmd.c (until_next_command): Likewise.
3419         * linespec.c (convert_linespec_to_sals): Likewise.
3420         * parse.c (parse_exp_in_context_1): Likewise.
3421         * printcmd.c (build_address_symbolic): likewise.
3422         (info_address_command): Likewise.
3423         symtab.c (find_function_start_sal): Likewise.
3424         (skip_prologue_sal): Likewise.
3425         (find_function_alias_target): Likewise.
3426         (find_gnu_ifunc): Likewise.
3427         * stack.c (find_frame_funname): Likewise.
3428         * symtab.c (fixup_symbol_section): Likewise.
3429         (find_function_start_sal): Likewise.
3430         (skip_prologue_sal): Likewsie.
3431         (find_function_alias_target): Likewise.
3432         (find_gnu_ifunc): Likewise.
3433         * tracepoint.c (info_scope_command): Likewise.
3434         * value.c (value_fn_field): Likewise.
3435
3436         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3437         in place of find_pc_partial_function.
3438         * blockframe.c (find_function_entry_range_from_pc): New function.
3439         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3440         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3441         for each range in a block.
3442
3443
3444 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3445
3446         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3447         incrementation.
3448
3449 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3450
3451         * solib-svr4.c (read_program_headers_from_bfd): Return
3452         gdb::optional<gdb::byte_vector>.
3453         (svr4_exec_displacement): Adjust.
3454
3455 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3456
3457         * solib-svr4.c (read_program_header): Return
3458         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3459         (find_program_interpreter): Return
3460         gdb::optional<gdb::byte_vector>.
3461         (scan_dyntag_auxv): Adjust.
3462         (enable_break): Adjust.
3463         (svr4_exec_displacement): Adjust.
3464
3465 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3466
3467         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3468         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3469
3470 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3471
3472         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3473         string_vprintf.
3474         * guile/scm-utils.c (gdbscm_printf): Likewise.
3475         * serial.c (serial_printf): Likewise.
3476         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3477
3478 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3479
3480         * stack.c (print_frame): Print frame architecture when printing on
3481         an MI output.
3482         * NEWS: Mention new "arch" attribute in frame output.
3483
3484 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3485
3486         * arch/aarch64.h (aarch64_regnum): Update comment.
3487
3488 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3489
3490         * NEWS: Add SVE to 8.2 section.
3491
3492 2018-08-21  Pedro Alves  <palves@redhat.com>
3493
3494         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3495         out from gdbscm_parse_function_args.
3496         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3497         gdbscm_parse_function_args_1.
3498
3499 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3500
3501         PR gdb/17816
3502         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3503         operator.
3504
3505 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3506
3507         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3508
3509 2018-08-19  Michael Spang  <spang@google.com>
3510
3511         PR gdb/11786
3512         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3513         for PT_TLS segments.
3514
3515 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3516
3517         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3518         dwarf_variable_value.
3519         * dwarf2-frame.c (class dwarf_expr_executor):
3520         Add override for dwarf_variable_value.
3521         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3522         (class symbol_needs_eval_context): Likewise.
3523         (indirect_synthetic_pointer): Add forward declaration.
3524         (sect_variable_value): New function.
3525         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3526         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3527         for DW_OP_GNU_variable_value.
3528
3529 2018-08-16  Tom Tromey  <tom@tromey.com>
3530
3531         * top.c (read_command_file): Update.
3532         (command_line_input): Remove "repeat" argument.
3533         * ada-lang.c (get_selections): Update.
3534         * linespec.c (decode_line_2): Update.
3535         * defs.h (command_line_input): Remove argument.
3536         * cli/cli-script.c (read_next_line): Update.
3537         * python/py-gdb-readline.c: Update.
3538
3539 2018-08-17  Tom Tromey  <tom@tromey.com>
3540
3541         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3542         command_line_input.
3543
3544 2018-08-15  Tom Tromey  <tom@tromey.com>
3545
3546         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3547
3548 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3549
3550         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3551         If used, use find_pc_partial_function to find address range
3552         to disassemble.
3553         * mi/mi-main.c (mi_cmd_list_features): Report
3554         "data-disassemble-a-option" feature.
3555         * NEWS: Mention new -data-disassemble option -a.
3556
3557 2018-08-13  Tom Tromey  <tom@tromey.com>
3558
3559         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3560
3561 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3562
3563         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3564         (aarch64_linux_collect_sve_regset): Likewise.
3565         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3566         * regcache.h (regcache_map_entry_size): New function.
3567
3568 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3569
3570         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3571         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3572         (SVE_HEADER_VL_LENGTH): Likewise.
3573         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3574         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3575         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3576         (SVE_HEADER_SIZE_OFFSET): Likewise.
3577         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3578         (SVE_HEADER_VL_OFFSET): Likewise.
3579         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3580         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3581         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3582         (SVE_HEADER_SIZE): Likewise.
3583         (aarch64_linux_core_read_vq): Add function.
3584         (aarch64_linux_core_read_description): Check for SVE section.
3585
3586 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3587
3588         * aarch64-fbsd-tdep.c
3589         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3590         collect_size.
3591         * aarch64-linux-tdep.c
3592         (aarch64_linux_iterate_over_regset_sections): Likewise.
3593         * alpha-linux-tdep.c
3594         (alpha_linux_iterate_over_regset_sections):
3595         * alpha-nbsd-tdep.c
3596         (alphanbsd_iterate_over_regset_sections): Likewise.
3597         * amd64-fbsd-tdep.c
3598         (amd64fbsd_iterate_over_regset_sections): Likewise.
3599         * amd64-linux-tdep.c
3600         (amd64_linux_iterate_over_regset_sections): Likewise.
3601         * arm-bsd-tdep.c
3602         (armbsd_iterate_over_regset_sections): Likewise.
3603         * arm-fbsd-tdep.c
3604         (arm_fbsd_iterate_over_regset_sections): Likewise.
3605         * arm-linux-tdep.c
3606         (arm_linux_iterate_over_regset_sections): Likewise.
3607         * corelow.c (get_core_registers_cb): Likewise.
3608         (core_target::fetch_registers): Likewise.
3609         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3610         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3611         * gdbarch.h (void): Regenerate.
3612         * gdbarch.sh: Add supply_size and collect_size.
3613         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3614         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3615         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3616         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3617         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3618         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3619         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3620         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3621         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3622         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3623         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3624         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3625         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3626         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3627         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3628         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3629         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3630         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3631         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3632         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3633         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3634         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3635         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3636         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3637         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3638         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3639         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3640         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3641         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3642         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3643
3644 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3645
3646         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3647         with string_printf.
3648
3649 2018-08-10  Keith Seitz  <keiths@redhat.com>
3650
3651         * compile/compile-c-support.c (add_code_header, add_code_footer):
3652         Move into policy class.
3653         (c_push_user_expression, pop_user_expression_nop)
3654         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3655         (compile_program): New host class.
3656         (c_compile_program): New typedef.
3657         (c_compute_porgram): Use c_compile_program.
3658
3659 2018-08-10  Keith Seitz  <keiths@redhat.com>
3660
3661         * compile/compile-internal.h (compile_instance::~compile_instance):
3662         Remove calls to htab_delete.
3663         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3664         * compile.c (compile_instance::compile_instance): Initialize
3665         htab unique pointers.
3666         (compile_instance::get_cached_type, compile_instance::insert_type)
3667         (compile_instance::error_symbol_once): Update for unique_ptr.
3668
3669 2018-08-10  Keith Seitz  <keiths@redhat.com>
3670
3671         * compile/compile-c-symbols.c (struct symbol_error)
3672         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3673         (compile_instance::insert_symbol_error)
3674         (compile_instance::error_symbol_once): Move to ...
3675         * compile/compile.c: ... here.
3676
3677 2018-08-10  Keith Seitz  <keiths@redhat.com>
3678
3679         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3680         instead of `new_compile_instance'.
3681         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3682         Update description.
3683         If the symbol error map is not initialized, create it.
3684         (generate_c_for_for_one_symbol): Do not check/initialize
3685         the symbol error map.
3686         * compile/compile-c-types.c (compile_c_instance): Make a class.
3687         Update all callers.
3688         (compile_instance::compile_instance): Initialize the type cache.
3689         (get_cached_type): New function.
3690         (insert_type): Update description.
3691         (compile_c_instance::m_default_cflags): Define.
3692         (convert_type): Update description.  Use get_cached_type.
3693         (delete_instance): Moved to destructor.
3694         (new_compile_instance): Moved to constructor.
3695         * compile/compile-c.h (compile_c_instance): Make class inheriting
3696         from compile_instance.
3697         <base>: Remove field.
3698         <type_map, symbol_err_map>: Move to base class.
3699         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3700         * compile/compile-internal.h (compile_instance): Make class.
3701         <type_map_t, symbol_err_map_t>: Define.
3702         <fe>: Rename to `m_gcc_fe'.
3703         <scope, block, gcc_target_options>: Add `m_' prefix.
3704         <m_type_map, m_symbol_err_map>: New fields, moved from
3705         compile_c_instance.
3706         <destroy>: Remove.
3707         (convert_type, new_compile_instance): Remove.
3708         * compile/compile.c (cleanup_compile_instance): Remove.
3709         (compile_to_object): Use unique_ptr to eliminate cleanups.
3710         (compile_instance::set_print_callback, compile_instance::version)
3711         (compile_instance::set_verbose)
3712         (compile_instance::set_driver_filename)
3713         (compile_instance::set_triplet_regexp)
3714         (compile_instance::set_arguments)
3715         (compile_instance::set_source_file)
3716         (compile_instance::compile): Define.
3717
3718 2018-08-10  Keith Seitz  <keiths@redhat.com>
3719
3720         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3721         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3722         gcc-c-fe.def to define C plugin.
3723         (delete_instance): Delete `c_plugin'.
3724         (new_compile_instance): Initialize `c_plugin'.
3725         * compile/compile-c.h: Include gcc_c_plugin.h.
3726         (struct compile_c_instance) <c_plugin>: New member.
3727         * gcc-c-plugin.h: New file.
3728         Update all callers with API change.
3729
3730 2018-08-10  Keith Seitz  <keiths@redhat.com>
3731
3732         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3733         (HFILES_NO_SRCDIR): ... to here.
3734         Add compile-internal.h and compile-c.h.
3735         * compile/compile-c-support.c: Include compile-c.h.
3736         * compile/compile-c-symbols.c: Include compile-c.h.
3737         (generate_c_for_variable_locations): Update comment.
3738         * compile/compile-c-types.c: Include compile-c.h.
3739         * compile/compile-c.h: New file -- moved C language declarations
3740         from other files here.
3741         * compile/compile-internal.h: Do not include hashtab.h or
3742         common/enum-flags.h.
3743         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3744         (gcc_convert_symbol, gcc_symbol_address)
3745         (generate_c_for_variable_locations, c_get_mode_for_size)
3746         (c_get_range_decl_name): Definitions moved to compile-c.h.
3747         * compile/compile-loc2c.c: Include compile-c.h.
3748
3749 2018-08-10  Keith Seitz  <keiths@redhat.com>
3750
3751         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3752         (c_symbol_substitution_name): ... this.
3753         Update all callers.
3754
3755 2018-08-10  Keith Seitz  <keiths@redhat.com>
3756
3757         * compile/compile-c-support.c (c_compute_program): Use
3758         unique_xmalloc_ptr to eliminate cleanup.
3759         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3760         Return a unique_xmalloc_ptr and eliminate cleanup.
3761         * compile/compile-internal.h (generate_c_for_variable_locations):
3762         Return unique_xmalloc_ptr and update description.
3763
3764 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3765
3766         * corelow.c (core_target::get_core_register_section): Rename
3767         min_size to section_min_size.
3768
3769 2018-08-09  Jim Wilson  <jimw@sifive.com>
3770
3771         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3772         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3773         * NEWS: Mention new GNU/Linux RISC-V target.
3774         * configure.host: Add riscv*-*-linux*.
3775         * configure.nat: Add riscv*.
3776         * configure.tgt: Add riscv*-*-linux*.
3777         * riscv-linux-nat.c: New file.
3778         * riscv-linux-tdep.c: New file.
3779
3780 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3781
3782         * infrun.c (resume): Make static, add forward declaration.
3783         (proceed): Update header comment.
3784         * infrun.h (resume): Delete declaration.
3785
3786 2018-08-09  Tom Tromey  <tom@tromey.com>
3787
3788         * riscv-tdep.h: Minor formatting fixes.
3789
3790 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3791
3792         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3793         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3794         (test_mkdir_recursive): Likewise.
3795         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3796
3797 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3798
3799         * valarith.c (value_subscripted_rvalue): If an array is not in
3800         memory, and we don't know the upper bound, then we can't know that
3801         the requested element exists or not.
3802
3803 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3804
3805         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3806         (target_options_to_string): Add comment.
3807
3808 2018-08-08  Tom Tromey  <tom@tromey.com>
3809
3810         * unittests/scoped_mmap-selftests.c: Check result of "write".
3811
3812 2018-08-08  Jim Wilson  <jimw@sifive.com>
3813
3814         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3815         (decode_register_index_short): New.
3816         (decode_j_type_insn, decode_cj_type_insn): New.
3817         (decode_b_type_insn, decode_cb_type_insn): New.
3818         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3819         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3820         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3821         is_c_sw_insn instead of is_sw_insn.
3822         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3823         (riscv_software_single_step): New.
3824         * riscv-tdep.h (riscv_software_single_step): Declare.
3825
3826         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3827         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3828
3829 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3830
3831         PR gdb/18050:
3832         * target.c (dispose_inferior): Don't dispose of inferiors that are
3833         already killed.
3834
3835 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3836
3837         * remote.c (remote_target::download_tracepoint): Change char* to
3838         const char*.
3839
3840 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3841
3842         * target.h (target_options_to_string): Return an std::string.
3843         * target.c (str_comma_list_concat_elem): Return void, use
3844         std::string.
3845         (do_option): Likewise.
3846         (target_options_to_string): Return an std::string.
3847         * linux-nat.c (linux_nat_target::wait): Adjust.
3848         * target-debug.h (target_debug_print_options): Adjust.
3849
3850 2018-08-07  Tom Tromey  <tom@tromey.com>
3851
3852         * Makefile.in (CPPFLAGS): New variable.
3853         (INTERNAL_CPPFLAGS): Use it.
3854
3855 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3856
3857         * NEWS: Mention the index cache.
3858
3859 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3860
3861         * common/pathstuff.h (get_standard_cache_dir): New.
3862         * common/pathstuff.c (get_standard_cache_dir): New.
3863         * build-id.h (build_id_to_string): New.
3864         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3865         DEBUG_STR_SUFFIX): Move to here.
3866         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3867         DEBUG_STR_SUFFIX): Move from there.
3868         (write_psymtabs_to_index): Make non-static, add basename
3869         parameter.  Write to temporary files, rename when done.
3870         (save_gdb_index_command): Adjust call to
3871         write_psymtabs_to_index.
3872         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3873         field.
3874         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3875         (get_gdb_index_contents_from_cache): New.
3876         (get_gdb_index_contents_from_cache_dwz): New.
3877         (dwarf2_initialize_objfile): Read index from cache.
3878         (dwarf2_build_psymtabs): Save to index.
3879         * dwarf-index-cache.h: New file.
3880         * dwarf-index-cache.c: New file.
3881         * dwarf-index-write.h: New file.
3882
3883 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3884
3885         * gnulib/aclocal.m4: Re-generate.
3886         * gnulib/config.in: Re-generate.
3887         * gnulib/configure: Re-generate.
3888         * gnulib/import/Makefile.am: Re-generate.
3889         * gnulib/import/Makefile.in: Re-generate.
3890         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3891         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3892         * gnulib/import/m4/mkdir.m4: New file.
3893         * gnulib/import/mkdir.c: New file.
3894         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3895         module.
3896
3897 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3898
3899         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3900         * common/scoped_mmap.c: New file.
3901         * common/scoped_mmap.h (destroy): New method.
3902         (~scoped_mmap, reset): Use destroy.
3903         (scoped_mmap): New move constructor.
3904         (mmap_file): New declaration.
3905         * unittests/scoped_mmap-selftests.c (test_normal,
3906         test_invalid_filename, run_tests): New functions.
3907         (_initialize_scoped_mmap_selftests): Register selftest.
3908
3909 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3910
3911         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3912         (read_gdb_index_from_buffer): ... this.  Remove section
3913         parameter, add buffer parameter.
3914         (get_gdb_index_contents_ftype,
3915         get_gdb_index_contents_dwz_ftype): New typedefs.
3916         (dwarf2_read_gdb_index): Add callback parameters to get the
3917         index contents.
3918         (get_gdb_index_contents_from_section): New.
3919         (dwarf2_initialize_objfile): Update call to
3920         dwarf2_read_gdb_index.
3921
3922 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3923
3924         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3925         (gdb_open_cloexec): Likewise.
3926         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3927         (commandline_from_pid): Likewise.
3928         (linux_xfer_osdata_threads): Likewise.
3929         (linux_xfer_osdata_fds): Likewise.
3930         * ada-lang.c (is_package_name): Likewise.
3931         * auxv.c (procfs_xfer_auxv): Likewise.
3932         * breakpoint.c (print_one_breakpoint_location): Use
3933         uiout::field_fmt.
3934         (print_one_catch_solib): Use string_printf.
3935         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3936         (add_pe_forwarded_sym): Likewise.
3937         * dwarf2read.c (create_type_unit_group): Likewise.
3938         (build_error_marker_type): Likewise.
3939         * infcall.c (get_function_name): Likewise.
3940         * valprint.c (print_converted_chars_to_obstack): Likewise.
3941         * xtensa-tdep.c (xtensa_register_type): Likewise.
3942
3943 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3944
3945         * remote.c (remote_target::download_tracepoint): Fix format
3946         string errors.
3947
3948 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3949
3950         * tracefile.c: Include common/byte-vector.h.
3951         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3952         with trace_regblock_size if needed.  Update uses of buf.
3953
3954 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3955
3956         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3957         std::vector<unsigned char>.
3958         * tracepoint.c (collection_list::collection_list): Remove
3959         m_regs_mask initializer from initializer list.  Resize
3960         m_regs_mask using the largest remote register number.
3961         (collection_list::add_remote_register): Remove size check on
3962         m_regs_mask.  Use at to access element.
3963         (collection_list::stringify): Change type of temp_buf to
3964         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3965         stringify the register mask.  Use pack_hex_byte for the register
3966         mask.
3967
3968 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3969
3970         * tracepoint.h (class collection_list) <add_register>: Remove.
3971         <add_remote_register, add_ax_registers, add_local_register>:
3972         Declare.
3973         <add_memrange>: Add scope parameter.
3974         * tracepoint.c (encode_actions_1): Likewise.
3975         (collection_list::add_register): Rename to ...
3976         (collection_list::add_remote_register): ... this.  Update
3977         comment.
3978         (collection_list::add_ax_registers, add_local_register): New
3979         methods.
3980         (collection_list::add_memrange): Add scope parameter.  Call
3981         add_local_register instead of add_register.
3982         (finalize_tracepoint_aexpr): New function.
3983         (collection_list::collect_symbol): Update calls to add_memrange.
3984         Call add_local_register instead of add_register.  Call
3985         add_ax_registers.  Call finalize_tracepoint_aexpr.
3986         (encode_actions_1): Get remote regnos for $reg action.  Call
3987         add_remote_register, add_ax_registers, and add_local_register.
3988         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3989         (validate_actionline): Call finalize_tracepoint_aexpr.
3990
3991 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3992
3993         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3994         Replace array buf with gdb::char_vector buf, of size
3995         get_remote_packet_size ().  Replace references to buf and
3996         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3997         and xsnprintf with snprintf.  Raise errors if the buffer is too
3998         small.
3999
4000 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4001
4002         * remote.c (remote_target::download_tracepoint): Fix the has_more
4003         predicate in the QTDP action list iteration.
4004
4005 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4006
4007         * remote.c (remote_target::download_tracepoint): Fix indentation
4008         in for block.
4009
4010 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4011
4012         * proc-api.c (_initialize_proc_api): Remove c, unused.
4013         * procfs.c (procfs_init_inferior): Remove signals, unused.
4014         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4015         unused.
4016
4017 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4018             Andrew Burgess  <andrew.burgess@embecosm.com>
4019
4020         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4021         'W_STOPCODE (0)' as this could be ambiguous.
4022
4023 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4024
4025         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4026         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4027         "ai_socktype").
4028
4029 2018-08-02  Tom Tromey  <tom@tromey.com>
4030
4031         PR symtab/16842.
4032         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4033         symbols.
4034         (process_structure_scope): Likewise.
4035
4036 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4037
4038         PR gdb/22629:
4039         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4040         kill inferior.
4041
4042 2018-08-02  Tom Tromey  <tom@tromey.com>
4043
4044         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4045         (darwin_suspend_inferior, darwin_resume_inferior)
4046         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4047         (darwin_check_new_threads): Check result of get_darwin_inferior.
4048
4049 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4050
4051         GDB 8.1.1 released.
4052
4053 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4054
4055         * varobj.c (varobj_get_path_expr_parent): Report an error if
4056         parent is a dynamic varobj.
4057
4058 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4059
4060         * gnulib/aclocal.m4: Re-generate.
4061         * gnulib/config.in: Re-generate.
4062         * gnulib/configure: Re-generate.
4063         * gnulib/import/Makefile.in: Re-generate.
4064         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4065         * gnulib/import/m4/onceonly.m4: Re-generate.
4066
4067 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4068
4069         * target-descriptions.c (struct xml_test_tdesc): New.
4070         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4071         (record_xml_tdesc): Update.
4072         (maintenance_check_xml_descriptions): Update.
4073         * target-descriptions.h (record_xml_tdesc): Update comment.
4074
4075 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4076
4077         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4078         checking array bounds are defined.
4079
4080 2018-07-30  Tom Tromey  <tom@tromey.com>
4081
4082         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4083         irreflexivity violation.
4084
4085 2018-07-30  Tom Tromey  <tom@tromey.com>
4086
4087         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4088         * value.c (unpack_long): Remove lint code.
4089         * valops.c (value_ind): Remove lint code.
4090         * valarith.c (value_x_binop, value_x_unop, value_equal)
4091         (value_pos): Remove lint code.
4092
4093 2018-07-28  Tom de Vries  <tdevries@suse.de>
4094
4095         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4096         with undefined upper bound as <optimized out>.
4097
4098 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4099
4100         * gcore.in: Rename variable "name" to "prefix".  Expand
4101         "usage" text.
4102
4103 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4104
4105         * windows-nat.c (windows_nat_target::create_inferior): Update to
4106         call close() in global namespace.
4107
4108 2018-07-26  Tom Tromey  <tom@tromey.com>
4109
4110         * dwarf-index-write.c (add_address_entry): Don't add objfile
4111         offsets.
4112         * dbxread.c (find_stab_function): Rename from
4113         find_stab_function_addr.  Return a bound_minimal_symbol.
4114         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4115         Don't add objfile offsets.
4116         (end_psymtab): Use raw_text_low, raw_text_high,
4117         MSYMBOL_VALUE_RAW_ADDRESS.
4118         (read_ofile_symtab): Update.
4119         (process_one_symbol): Update.
4120         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4121         offsets.
4122         (dw2_relocate): Remove.
4123         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4124         searching addrmap.
4125         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4126         Update.
4127         (process_psymtab_comp_unit_reader, add_partial_symbol)
4128         (add_partial_subprogram, dwarf2_ranges_read): Update.
4129         (load_partial_dies): Update.
4130         (add_address_entry): Don't add objfile offsets.
4131         (dwarf2_build_include_psymtabs): Update.
4132         (create_addrmap_from_aranges): Don't add objfile offsets.
4133         (dw2_find_pc_sect_compunit_symtab): Update.
4134         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4135         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4136         Update.
4137         (parse_partial_symbols): Don't add objfile offsets.  Use
4138         raw_text_low, raw_text_high.  Update.
4139         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4140         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4141         or call 'relocate' quick function.  Clear psymbol_map.
4142         * psympriv.h (struct partial_symbol) <address>: Add section
4143         offset.
4144         <set_unrelocated_address>: Rename from set_address.
4145         <raw_text_low, raw_text_high>: New methods.
4146         <text_low, text_high>: Add objfile parameter.
4147         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4148         set_unrelocated_address.
4149         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4150         (find_pc_psymbol): Update.
4151         (fixup_psymbol_section, relocate_psymtabs): Remove.
4152         (dump_psymtab, psym_functions): Update.
4153         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4154         parameter.
4155         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4156         (start_psymtab_common): Update.
4157         * symfile-debug.c (debug_qf_relocate): Remove.
4158         (debug_sym_quick_functions): Update.
4159         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4160         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4161         Update.
4162
4163 2018-07-26  Tom Tromey  <tromey@redhat.com>
4164
4165         * dbxread.c (end_psymtab): Use text_high_valid and
4166         text_low_valid.
4167         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4168         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4169         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4170         Update comment.
4171         <text_low_valid, text_high_valid>: New fields.
4172         <set_text_low, set_text_high>: Update.
4173         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4174
4175 2018-07-26  Tom Tromey  <tom@tromey.com>
4176
4177         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4178         Update.
4179         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4180         textlow and texthigh fields.
4181         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4182         Update.
4183         * mdebugread.c (parse_lines, parse_partial_symbols)
4184         (psymtab_to_symtab_1): Update.
4185         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4186         Rename fields.  Update comment.  Now private.
4187         <text_low, text_high, set_text_low, set_text_high>: New methods.
4188         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4189         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4190         (start_psymtab_common, maintenance_info_psymtabs)
4191         (maintenance_check_psymtabs): Update.
4192         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4193         texthigh fields.
4194         (scan_xcoff_symtab): Update.
4195
4196 2018-07-26  Tom Tromey  <tromey@redhat.com>
4197
4198         * psympriv.h (struct partial_symbol) <unrelocated_address,
4199         address, set_address>: New methods.
4200         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4201         (fixup_psymbol_section, relocate_psymtabs): Update.
4202         (print_partial_symbols): Add 'objfile' parameter.  Update.
4203         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4204         Update.
4205
4206 2018-07-26  Tom Tromey  <tom@tromey.com>
4207
4208         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4209         (debug_names::write_psymbols): Update.
4210         * psympriv.h (struct partial_symbol): Derive from
4211         general_symbol_info.
4212         <obj_section>: New method.
4213         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4214         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4215         (find_pc_sect_psymbol, fixup_psymbol_section)
4216         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4217         (print_partial_symbols, recursively_search_psymtabs)
4218         (compare_psymbols, psymbol_hash, psymbol_compare)
4219         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4220         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4221
4222 2018-07-26  Tom Tromey  <tromey@redhat.com>
4223
4224         * dbxread.c (end_psymtab): Remove dead code.
4225
4226 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4227
4228         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4229         DWARF unwinders are disabled.
4230         * dwarf2-frame.c: Add dwarf2read.h include.
4231         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4232         disabled.
4233         (dwarf2_frame_unwinders_enabled_p): Define.
4234         (show_dwarf_unwinders_enabled_p): New function.
4235         (_initialize_dwarf2_frame): Register switch to control DWARF
4236         unwinder use.
4237         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4238         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4239         (show_dwarf_cmdlist): Remove static keyword.
4240         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4241         (show_dwarf_cmdlist): Declare.
4242         * NEWS: Document new feature.
4243
4244 2018-07-26  Tom de Vries  <tdevries@suse.de>
4245
4246         PR breakpoints/23366
4247         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4248
4249 2018-07-26  Tom de Vries  <tdevries@suse.de>
4250
4251         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4252         DW_AT_count can't be translated to a dynamic prop.
4253
4254 2018-07-25  Tom de Vries  <tdevries@suse.de>
4255
4256         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4257         try/catch.
4258
4259 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4260
4261         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4262
4263 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4264
4265         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4266
4267 2018-07-24  Keith Seitz  <keiths@redhat.comt
4268
4269         PR symtab/23010
4270         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4271         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4272         instead of add_symbol_to_list.
4273         (read_file_scope): Call prepare_one_comp_unit before reading
4274         any other DIEs.
4275
4276 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4277
4278         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4279
4280 2018-07-24  Tom Tromey  <tom@tromey.com>
4281
4282         * utils.c (malloc, realloc, free): Don't declare.
4283         * configure, config.in: Rebuild.
4284         * configure.ac: Don't check for declarations of free, malloc, or
4285         realloc.
4286
4287 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4288
4289         * aarch64-linux-nat.c
4290         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4291         variable.
4292         * arm-linux-nat.c (fetch_regs): Likewise.
4293         (store_regs): Likewise.
4294         (fetch_vfp_regs): Likewise.
4295         (store_vfp_regs): Likewise.
4296         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4297         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4298         (arm_linux_nat_target::insert_watchpoint): Likewise.
4299         (arm_linux_nat_target::remove_watchpoint): Likewise.
4300         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4301         Likewise.
4302         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4303         Likewise.
4304         * ppc-linux-nat.c (fetch_register): Likewise.
4305         (fetch_all_gp_regs): Likewise.
4306         (fetch_ppc_registers): Likewise.
4307         (store_all_gp_regs): Likewise.
4308         (store_ppc_registers): Likewise.
4309         (hwdebug_insert_point): Likewise.
4310         (can_use_watchpoint_cond_accel): Likewise.
4311         * remote-sim.c (gdb_os_write_stdout): Likewise.
4312
4313 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4314             Tom Tromey  <tom@tromey.com>
4315
4316         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4317         test for it.
4318         * configure: Rebuild.
4319
4320 2018-07-22  Tom Tromey  <tom@tromey.com>
4321
4322         * regformats/regdat.sh: Define xmltarget_${name} inside
4323         #ifndef IN_PROCESS_AGENT.
4324
4325 2018-07-22  Tom Tromey  <tom@tromey.com>
4326
4327         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4328
4329 2018-07-22  Tom Tromey  <tom@tromey.com>
4330
4331         * symfile.c (reread_symbols): Notify iter, not objfile.
4332
4333 2018-07-22  Tom Tromey  <tom@tromey.com>
4334
4335         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4336         Use arch_ops.
4337         (ravenscar_thread_target::prepare_to_store): Likewise.
4338
4339 2018-07-22  Tom Tromey  <tom@tromey.com>
4340
4341         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4342         unused variable.  Call value_fetch_lazy when needed.
4343         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4344         Remove unused variable.  Call value_fetch_lazy when needed.
4345
4346 2018-07-22  Tom Tromey  <tom@tromey.com>
4347
4348         * m32c-tdep.c (mark_dma): Return void.
4349         (make_regs): Remove unused declarations.
4350
4351 2018-07-22  Tom Tromey  <tom@tromey.com>
4352
4353         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4354         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4355         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4356         bkscm_get_valid_block_smob_arg_unsafe for effect.
4357
4358 2018-07-22  Tom Tromey  <tom@tromey.com>
4359
4360         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4361         value_type.
4362
4363 2018-07-22  Tom Tromey  <tom@tromey.com>
4364
4365         * windows-nat.c (saved_context): Conditionally define.
4366         * remote.c (remote_target::remote_btrace_maybe_reopen):
4367         Conditionally declare "warned".
4368         * inflow.c (sigquit_ours): Conditionally define.
4369         (new_tty): Move "tty" declaration inside #if.
4370         * guile/guile.c (guile_datadir): Conditionally define.
4371         * charset.c (set_be_le_names): Move some declarations inside #if.
4372         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4373         #if.
4374         (parse_xml_btrace_conf): Likewise.
4375
4376 2018-07-22  Tom Tromey  <tom@tromey.com>
4377
4378         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4379
4380 2018-07-22  Tom Tromey  <tom@tromey.com>
4381
4382         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4383         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4384         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4385         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4386         * stack.c (frame_apply_level_command): Remove unused variable.
4387         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4388         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4389         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4390         unused variable.
4391         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4392         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4393         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4394         variable.
4395         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4396         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4397         variable.
4398         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4399         Remove unused variable.
4400         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4401         variable.
4402         * common/tdesc.c (print_xml_feature::visit): Remove unused
4403         variable.
4404         * compile/compile-object-load.c (store_regs): Remove unused
4405         variables.
4406         * complaints.c (clear_complaints): Remove unused variable.
4407         * corelow.c (core_target_open): Remove unused variable.
4408         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4409         variable.
4410         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4411         variable.
4412         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4413         variable.
4414         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4415         variable.
4416         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4417         variable.
4418         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4419         variable.
4420         * ia64-tdep.c (examine_prologue): Remove unused variable.
4421         * infcall.c (run_inferior_call): Remove unused variable.
4422         * inferior.c (exit_inferior): Remove unused variable.
4423         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4424         * linespec.c (decode_line_2): Remove unused variable.
4425         * linux-nat.c (super_close): Remove.
4426         * linux-tdep.c (linux_info_proc): Remove unused variable.
4427         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4428         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4429         Remove unused variable.
4430         * parse.c (find_minsym_type_and_address): Remove unused variable.
4431         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4432         variable.
4433         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4434         variable.
4435         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4436         variables.
4437         * record-btrace.c (record_btrace_target::store_registers): Remove
4438         unused variable.
4439         (cmd_show_record_btrace_cpu): Remove unused variable.
4440         * riscv-tdep.c (riscv_register_reggroup_p)
4441         (riscv_push_dummy_call, riscv_return_value): Remove unused
4442         variable.
4443         * rust-exp.y (literal): Remove unused variable.
4444         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4445         unused variable.
4446         <STRUCTOP_ANONYMOUS>: Likewise.
4447         * s390-linux-tdep.c (s390_linux_init_abi_31)
4448         (s390_linux_init_abi_64): Remove unused variable.
4449         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4450         (file_select_thread, net_windows_open, _initialize_ser_windows):
4451         Remove unused variables.
4452         * symtab.c (find_pc_sect_line): Remove unused variable.
4453         * target-memory.c (compute_garbled_blocks): Remove unused
4454         variable.
4455         (target_write_memory_blocks): Remove unused variable.
4456         * target.c (target_stack::unpush): Remove unused variables.
4457         * tracepoint.c (start_tracing, all_tracepoint_actions)
4458         (merge_uploaded_trace_state_variables)
4459         (print_one_static_tracepoint_marker): Remove unused variable.
4460         * unittests/basic_string_view/element_access/char/1.cc (test01):
4461         Remove unused variable.
4462         * windows-nat.c (windows_continue, windows_add_all_dlls)
4463         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4464         Remove unused variables.
4465
4466 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4467
4468         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4469         attr_profile in HAVE_ELF.
4470         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4471         HAVE_ELF.
4472
4473 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4474
4475         * frame.c (frame_register_unwind): Change parameter name.
4476         (frame_unwind_register): Likewise.
4477         (frame_unwind_register_value): Likewise.
4478         (frame_unwind_register_signed): Likewise.
4479         (frame_unwind_register_unsigned): Likewise.
4480         * frame.h (frame_register_unwind): Likewise.
4481         (frame_unwind_register): Likewise.
4482         (frame_unwind_register_value): Likewise.
4483         (frame_unwind_register_signed): Likewise.
4484         (frame_unwind_register_unsigned): Likewise.
4485         (frame_unwind_arch): Likewise.
4486
4487 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4488
4489         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4490         ISA maintenance.
4491
4492 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4493
4494         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4495         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4496         hand.
4497
4498 2018-07-20  Keith Seitz  <keiths@redhat.com>
4499
4500         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4501         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4502         m_compunit_symtab, m_language>: Add "m_" prefix.
4503         Update all uses.
4504         * buildsym.c: Update all uses.
4505
4506 2018-07-20  Tom Tromey  <tom@tromey.com>
4507
4508         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4509         * buildsym.h (record_line_ftype): Remove typedef.
4510
4511 2018-07-20  Tom Tromey  <tom@tromey.com>
4512
4513         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4514         (end_expandable_symtab): Likewise.
4515         (end_symtab_get_static_block): Likewise.
4516         (end_symtab_from_static_block): Likewise.
4517         * buildsym-legacy.c (augment_type_symtab): Remove.
4518         (end_expandable_symtab): Remove.
4519         (end_symtab_get_static_block): Remove.
4520         (end_symtab_from_static_block): Remove.
4521
4522 2018-07-20  Tom Tromey  <tom@tromey.com>
4523
4524         * dwarf2read.c: Include buildsym.h.
4525         (struct dwarf2_cu) <builder>: New method.
4526         (fixup_go_packaging): Update.
4527         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4528         use scoped_free_pendings.
4529         (using_directives): Add "cu" parameter, remove "language".
4530         (read_import_statement, setup_type_unit_groups, )
4531         (read_func_scope, read_lexical_block_scope)
4532         (dwarf2_record_block_ranges, read_namespace): Update.
4533         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4534         (lnp_state_machine::handle_end_sequence): Update.
4535         (class lnp_state_machine) <m_cu>: New member.
4536         <m_record_line_callback>: Remove.
4537         <m_currently_recording_lines>: New member.
4538         (lnp_state_machine::handle_set_file): Update.
4539         (noop_record_line): Remove.
4540         (dwarf_record_line_p): Add cu parameter.
4541         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4542         (lnp_state_machine::record_line)
4543         (lnp_state_machine::lnp_state_machine)
4544         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4545         (dwarf_decode_lines): Update.
4546         (dwarf2_start_subfile): Add cu parameter.
4547         (dwarf2_start_symtab, new_symbol): Update.
4548         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4549         Remove dwarf2_per_objfile parameter.
4550         (dwarf_decode_macros): Update.
4551
4552 2018-07-20  Tom Tromey  <tom@tromey.com>
4553
4554         * stabsread.c (define_symbol): Update.
4555         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4556         * dwarf2read.c (new_symbol): Update.
4557         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4558         * cp-namespace.c: Include buildsym.h.
4559         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4560         * buildsym-legacy.c (get_buildsym_compunit): New function.
4561
4562 2018-07-20  Tom Tromey  <tom@tromey.com>
4563
4564         * xcoffread.c: Include buildsym-legacy.h.
4565         * windows-nat.c: Include buildsym-legacy.h.
4566         * stabsread.c: Include buildsym-legacy.h.
4567         * mdebugread.c: Include buildsym-legacy.h.
4568         * buildsym-legacy.h: New file.
4569         * buildsym-legacy.c: New file, from buildsym.c.
4570         * go32-nat.c: Include buildsym-legacy.h.
4571         * dwarf2read.c: Include buildsym-legacy.h.
4572         * dbxread.c: Include buildsym-legacy.h.
4573         * cp-namespace.c: Include buildsym-legacy.h.
4574         * coffread.c: Include buildsym-legacy.h.
4575         * buildsym.h: Move some contents to buildsym-legacy.h.
4576         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4577         buildsym-legacy.c.
4578         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4579
4580 2018-07-20  Tom Tromey  <tom@tromey.com>
4581
4582         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4583         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4584         (buildsym_compunit::buildsym_compunit)
4585         (buildsym_compunit::~buildsym_compunit)
4586         (buildsym_compunit::get_macro_table): Define.
4587
4588 2018-07-20  Tom Tromey  <tom@tromey.com>
4589
4590         * buildsym.c (reset_symtab_globals): Remove.
4591         (buildsym_compunit::end_symtab_from_static_block): Update.
4592         (buildsym_compunit::augment_type_symtab): Update.
4593         (end_symtab_from_static_block): Call free_buildsym_compunit.
4594         (augment_type_symtab, end_symtab, end_expandable_symtab):
4595         Likewise.
4596
4597 2018-07-20  Tom Tromey  <tom@tromey.com>
4598
4599         * arch-utils.c: Do not include buildsym.h.
4600         * mipsread.c: Do not include buildsym.h.
4601         * machoread.c: Do not include buildsym.h.
4602         * elfread.c: Do not include buildsym.h.
4603
4604 2018-07-20  Tom Tromey  <tom@tromey.com>
4605
4606         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4607         initialization.
4608         (buildsym_compunit): Add new constructor.
4609         (struct buildsym_compunit) <get_last_source_file, finish_block,
4610         record_block_range, start_subfile, patch_subfile_names,
4611         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4612         set_last_source_start_addr, get_last_source_start_addr,
4613         get_local_using_directives, set_local_using_directives,
4614         get_global_using_directives, outermost_context_p,
4615         get_current_context_stack, get_context_stack_depth,
4616         get_current_subfile, get_local_symbols, get_file_symbols,
4617         get_global_symbols, record_debugformat, record_producer,
4618         push_context, pop_context, end_symtab_get_static_block,
4619         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4620         New public methods.
4621         <record_pending_block, finish_block_internal, make_blockvector,
4622         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4623         private methods.
4624         Update all users.
4625
4626 2018-05-22  Tom Tromey  <tom@tromey.com>
4627
4628         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4629         parameter.
4630         (finish_block_internal): Update.
4631
4632 2018-07-20  Tom Tromey  <tom@tromey.com>
4633
4634         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4635         parameter.
4636         (finish_block_internal): Update.
4637
4638 2018-07-20  Tom Tromey  <tom@tromey.com>
4639
4640         * buildsym.h (EXTERN): Don't define or undef.
4641         * buildsym.c (EXTERN): Don't define.
4642
4643 2018-07-20  Tom Tromey  <tom@tromey.com>
4644
4645         * buildsym.c: Remove TODO comment.
4646
4647 2018-07-20  Tom Tromey  <tom@tromey.com>
4648
4649         * coffread.c (coff_symtab_read): Update.
4650         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4651         (xcoff_new_init): Update.
4652         * mipsread.c (mipscoff_new_init): Update.
4653         * mdebugread.c (mdebug_build_psymtabs): Update.
4654         * elfread.c (elf_new_init): Update.
4655         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4656         Update.
4657         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4658         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4659         (stabsect_build_psymtabs): Update.
4660         * buildsym.h (buildsym_init): Don't declare.
4661         * buildsym.c: Update comment.
4662         (prepare_for_building): Remove.
4663         (start_symtab, restart_symtab): Update.
4664         (reset_symtab_globals): Update comment.
4665         (buildsym_init): Remove.
4666
4667 2018-07-20  Tom Tromey  <tom@tromey.com>
4668
4669         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4670         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4671         (read_enum_type, common_block_start, common_block_end)
4672         (cleanup_undefined_types_1, finish_global_stabs): Update.
4673         * mdebugread.c (psymtab_to_symtab_1): Update.
4674         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4675         (read_lexical_block_scope, new_symbol): Update.
4676         * dbxread.c (process_one_symbol): Update.
4677         * coffread.c (coff_symtab_read, process_coff_symbol)
4678         (coff_read_enum_type): Update.
4679         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4680         declare.
4681         (get_local_symbols, get_file_symbols, get_global_symbols): New
4682         functions.
4683         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4684         m_global_symbols.
4685         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4686         (~scoped_free_pendings): Update.
4687         (finish_block, prepare_for_building, reset_symtab_globals)
4688         (end_symtab_get_static_block, end_symtab_with_blockvector)
4689         (augment_type_symtab, push_context): Update.
4690         (get_local_symbols, get_file_symbols, get_global_symbols): New
4691         functions.
4692         (buildsym_init): Update.
4693
4694 2018-07-20  Tom Tromey  <tom@tromey.com>
4695
4696         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4697         (process_full_type_unit): Likewise.
4698         (dwarf2_start_symtab): Set list_in_scope.
4699
4700 2018-07-20  Tom Tromey  <tom@tromey.com>
4701
4702         * dwarf2read.c (process_psymtab_comp_unit_reader)
4703         (build_type_psymtabs_reader): Do not set list_in_scope.
4704
4705 2018-07-20  Tom Tromey  <tom@tromey.com>
4706
4707         * buildsym.c (free_pendings): Remove.
4708         (add_symbol_to_list, scoped_free_pendings)
4709         (finish_block_internal, buildsym_init): Update.
4710
4711 2018-07-20  Tom Tromey  <tom@tromey.com>
4712
4713         * xcoffread.c (read_xcoff_symtab): Update.
4714         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4715         Update.
4716         * dbxread.c (process_one_symbol): Update.
4717         * coffread.c (coff_symtab_read): Update.
4718         * buildsym.h (finish_block): Update.
4719         * buildsym.c (finish_block): Remove "listhead" argument.
4720         (end_symtab_get_static_block): Update.
4721
4722 2018-07-20  Tom Tromey  <tom@tromey.com>
4723
4724         * buildsym.h (class scoped_free_pendings): Remove constructor.
4725         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4726         method.
4727         <m_pending_block_obstack, m_pending_blocks>: New members.
4728         (pending_block_obstack, pending_blocks): Remove.
4729         (scoped_free_pendings::scoped_free_pendings): Default.
4730         (~scoped_free_pendings): Update.
4731         (free_pending_blocks): Remove.
4732         (finish_block_internal, record_pending_block, make_blockvector)
4733         (end_symtab_get_static_block, augment_type_symtab, push_context)
4734         (buildsym_init): Update.
4735
4736 2018-07-20  Tom Tromey  <tom@tromey.com>
4737
4738         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4739         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4740         members.
4741         (pending_addrmap, pending_addrmap_obstack)
4742         (pending_addrmap_interesting): Remove.
4743         (scoped_free_pendings, record_block_range, make_blockvector)
4744         (prepare_for_building, reset_symtab_globals, buildsym_init):
4745         Update.
4746
4747 2018-07-20  Tom Tromey  <tom@tromey.com>
4748
4749         * xcoffread.c (process_linenos): Update.
4750         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4751         * mdebugread.c (psymtab_to_symtab_1): Update.
4752         * dwarf2read.c (setup_type_unit_groups)
4753         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4754         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4755         * dbxread.c (process_one_symbol): Update.
4756         * coffread.c (coff_symtab_read, enter_linenos)
4757         (process_coff_symbol): Update.
4758         * buildsym.h (current_subfile): Don't declare.
4759         (get_current_subfile): Declare.
4760         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4761         member.
4762         (start_subfile, free_buildsym_compunit, push_subfile)
4763         (prepare_for_building, start_symtab): Update.
4764         (get_current_subfile): New function.
4765
4766 2018-07-20  Tom Tromey  <tom@tromey.com>
4767
4768         * coffread.c (coff_symtab_read): Update.
4769         * xcoffread.c (read_xcoff_symtab): Update.
4770         * dwarf2read.c (new_symbol): Update.
4771         (read_func_scope, read_lexical_block_scope): Update.
4772         * dbxread.c (process_one_symbol): Update.
4773         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4774         (outermost_context_p): Remove macro.
4775         (outermost_context_p, get_current_context_stack)
4776         (get_context_stack_depth): Declare.
4777         (pop_context): Return struct context_stack.
4778         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4779         member.
4780         (context_stack_size): Remove.
4781         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4782         (prepare_for_building, end_symtab_get_static_block)
4783         (augment_type_symtab, push_context): Update.
4784         (pop_context): Return struct context_stack.
4785         (outermost_context_p, get_current_context_stack)
4786         (get_context_stack_depth): New functions.
4787         (buildsym_init): Update.
4788
4789 2018-07-20  Tom Tromey  <tom@tromey.com>
4790
4791         * rust-exp.y: Now a pure parser.  Update all rules.
4792         (%union): Move earlier.
4793         (current_parser, work_obstack): Remove globals.
4794         (rust_parser, ~rust_parser): Update.
4795         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4796         lex_character, lex_number, lex_string, lex_identifier,
4797         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4798         convert_name, convert_params_to_expression,
4799         convert_ast_to_expression, ast_basic_type, ast_operation,
4800         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4801         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4802         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4803         ast_array_type, ast_slice_type, ast_reference_type,
4804         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4805         (rust_parse): Update.
4806         (rustyyerror, rustyylex): Add parser parameter.
4807         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4808         (rust_lex_stringish_test, rust_lex_test_sequence)
4809         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4810         (rust_lex_test_push_back, rust_lex_tests): Update.
4811
4812 2018-07-19  Pedro Alves  <palves@redhat.com>
4813
4814         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4815         gdb::unique_xmalloc_ptr.
4816         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4817         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4818         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4819         copy-initialization.
4820         * guile/scm-pretty-print.c (ppscm_print_children): Use
4821         gdb::unique_xmalloc_ptr instead of cleanups.
4822         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4823         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4824         gdb::unique_xmalloc_ptr.
4825         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4826         Adjust to use gdb::unique_xmalloc_ptr.
4827         * guile/scm-utils.c (extract_arg): Adjust.
4828         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4829         gdb::unique_xmalloc_ptr instead of a cleanup.
4830
4831 2018-07-19  Tom Tromey  <tom@tromey.com>
4832
4833         * utils.c (do_value_free_to_mark)
4834         (make_cleanup_value_free_to_mark): Remove.
4835         * utils.h (make_cleanup_value_free_to_mark): Remove.
4836
4837 2018-07-19  Pedro Alves  <palves@redhat.com>
4838
4839         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4840         forwarding reference.
4841
4842 2018-07-18  Pedro Alves  <palves@redhat.com>
4843
4844         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4845         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4846         cleanup.
4847
4848 2018-07-18  Pedro Alves  <palves@redhat.com>
4849
4850         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4851         exceptions.
4852         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4853         (gdbscm_wrap): New.
4854         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4855         directly instead of a cleanup.
4856         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4857         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4858         (vlscm_binop_gdbthrow): New, factored out from ...
4859         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4860         (vlscm_rich_compare): Use gdbscm_wrap.
4861         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4862         instead of a cleanup.
4863         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4864         cleanup.
4865         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4866         Use xfree directly instead of a cleanup.
4867         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4868         Adjust to use gdbscm_wrap and scoped_value_mark.
4869         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4870         (gdbscm_value_address, gdbscm_value_dereference)
4871         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4872         scoped_value_mark.
4873         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4874         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4875         scoped_value_mark.
4876         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4877         gdbscm_wrap and scoped_value_mark.
4878         (gdbscm_value_to_string): Use xfree directly instead of a
4879         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4880         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4881         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4882         scoped_value_mark.
4883         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4884         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4885         scoped_value_mark.
4886         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4887         gdbscm_wrap.
4888
4889 2018-07-18  Tom de Vries  <tdevries@suse.de>
4890
4891         * findvar.c (default_read_var_value): Also resolve dynamic type for
4892         LOC_OPTIMIZED_OUT vars.
4893
4894 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4895
4896         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4897         decoding.
4898
4899 2018-07-17  Tom Tromey  <tom@tromey.com>
4900
4901         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4902         (compute_enum_list, pascm_set_param_value_x)
4903         (gdbscm_parameter_value): Update.
4904         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4905         (gdbscm_scm_to_host_string): Update.
4906         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4907         Update.
4908         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4909         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4910         * guile/scm-string.c (gdbscm_scm_to_string): Return
4911         unique_xmalloc_ptr.
4912         (gdbscm_scm_to_host_string): Likewise.
4913
4914 2018-07-17  Tom Tromey  <tom@tromey.com>
4915
4916         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4917         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4918         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4919         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4920         unique_xmalloc_ptr.
4921
4922 2018-07-17  Tom Tromey  <tom@tromey.com>
4923
4924         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4925         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4926         Update.
4927         * guile/scm-cmd.c (cmdscm_function): Update.
4928         * guile/scm-pretty-print.c
4929         (ppscm_print_exception_unless_memory_error): Update.
4930         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4931         Return unique_xmalloc_ptr.
4932
4933 2018-07-17  Tom Tromey  <tom@tromey.com>
4934
4935         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4936         Use string_printf.
4937
4938 2018-07-17  Jim Wilson  <jimw@sifive.com>
4939
4940         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4941         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4942         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4943         unecessary braces after EF_RISCV_RVC test.  Delete call to
4944         set_gdbarch_decr_pc_after_break.
4945
4946         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4947         RISCV_LAST_FP_REGNUM + 1.
4948         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4949
4950 2018-07-17  Tom Tromey  <tom@tromey.com>
4951
4952         * configure.ac: Remove --disable-gdbcli.
4953         * configure: Rebuild.
4954         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4955         (SUBDIR_CLI_CFLAGS): Remove.
4956         (SFILES): Use SUBDIR_CLI_SRCS.
4957         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4958
4959 2018-07-17  Tom Tromey  <tom@tromey.com>
4960
4961         PR gdb/18624:
4962         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4963
4964 2018-07-16  Jim Wilson  <jimw@sifive.com>
4965
4966         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4967
4968 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4969
4970         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4971         variable.
4972         (libunwind_frame_sniffer): Likewise.
4973         (libunwind_frame_prev_register): Likewise.
4974         (libunwind_sigtramp_frame_sniffer): Likewise.
4975         * ia64-tdep.c (ia64_access_reg): Likewise.
4976         (ia64_access_rse_reg): Likewise.
4977         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4978         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4979
4980 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4981
4982         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4983
4984 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4985
4986         * remote-sim.c (gdbsim_target::close,
4987         gdbsim_target::mourn_inferior): Remove unused variables.
4988
4989 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4990
4991         * ia64-tdep.c (ktab_buf): New global.
4992         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4993         (get_kernel_table): Adjust.
4994
4995 2018-07-16  Tom Tromey  <tom@tromey.com>
4996
4997         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4998         * dwarf2read.c (using_directives, new_symbol): Use
4999         outermost_context_p.
5000         * dbxread.c (process_one_symbol): Use outermost_context_p.
5001         * coffread.c (coff_symtab_read): Use outermost_context_p.
5002
5003 2018-07-16  Tom Tromey  <tom@tromey.com>
5004
5005         * dwarf2read.c (using_directives, read_func_scope)
5006         (read_lexical_block_scope): Update.
5007         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5008         * buildsym.h (local_using_directives, global_using_directives):
5009         Don't declare.
5010         (get_local_using_directives, set_local_using_directives)
5011         (get_global_using_directives): Declare.
5012         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5013         m_global_using_directives>: New members.
5014         (finish_block_internal, prepare_for_building)
5015         (reset_symtab_globals, end_symtab_get_static_block)
5016         (push_context): Update.
5017         (get_local_using_directives, set_local_using_directives)
5018         (get_global_using_directives): New functions.
5019         (buildsym_init): Update.
5020
5021 2018-07-16  Tom Tromey  <tom@tromey.com>
5022
5023         * xcoffread.c (xcoff_initial_scan): Don't call
5024         free_pending_blocks.
5025         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5026         * buildsym.h (class scoped_free_pendings): Add constructor.
5027         (free_pending_blocks): Don't declare.
5028         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5029         (free_pending_blocks): Now static.
5030
5031 2018-07-16  Tom Tromey  <tom@tromey.com>
5032
5033         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5034         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5035         member.
5036         (struct subfile_stack): Remove.
5037         (subfile_stack): Remove.
5038         (push_subfile, pop_subfile, buildsym_init): Update.
5039
5040 2018-07-16  Tom Tromey  <tom@tromey.com>
5041
5042         * buildsym.c (push_subfile): Use gdb_assert.
5043         (pop_subfile): Use gdb_assert.
5044
5045 2018-07-16  Tom Tromey  <tom@tromey.com>
5046
5047         * buildsym.h (merge_symbol_lists): Remove.
5048         * buildsym.c (merge_symbol_lists): Remove.
5049
5050 2018-07-16  Tom Tromey  <tom@tromey.com>
5051
5052         * stabsread.c (scan_file_globals): Update comment.
5053         * stabsread.h (scan_file_globals): Move from buildsym.h.
5054         * buildsym.h (scan_file_globals): Move to stabsread.h.
5055
5056 2018-07-16  Tom Tromey  <tom@tromey.com>
5057
5058         * xcoffread.c (xcoff_new_init): Update.
5059         * mipsread.c (mipscoff_new_init): Update.
5060         * mdebugread.c (mdebug_build_psymtabs): Update.
5061         * elfread.c (elf_new_init): Update.
5062         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5063         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5064         * buildsym.h (buildsym_new_init): Don't declare.
5065         * buildsym.c (buildsym_new_init): Remove.
5066
5067 2018-07-16  Tom Tromey  <tom@tromey.com>
5068
5069         * stabsread.h (within_function): Move from buildsym.h.
5070         * stabsread.c (start_stabs): Clear within_function.
5071         * coffread.c (coff_start_symtab): Clear within_function.
5072         * buildsym.h (within_function): Move to stabsread.h.
5073         * buildsym.c (prepare_for_building): Update.
5074
5075 2018-07-16  Tom Tromey  <tom@tromey.com>
5076
5077         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5078         * dwarf2read.c (dwarf2_start_symtab): Don't set
5079         processing_gcc_compilation.
5080         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5081
5082 2018-07-16  Tom Tromey  <tom@tromey.com>
5083
5084         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5085         (next_symbol_text_func): Move from buildsym.h.
5086         * stabsread.c (hashname): Move from buildsym.c.
5087         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5088         (next_symbol_text_func, hashname): Move to stabsread.h.
5089         * buildsym.c: Don't include bcache.h
5090         (hashname): Move to stasbread.c.
5091
5092 2018-07-16  Tom Tromey  <tom@tromey.com>
5093
5094         * buildsym.h (context_stack_size): Don't declare.
5095         * buildsym.c (context_stack_size): New global.
5096
5097 2018-07-16  Tom Tromey  <tom@tromey.com>
5098
5099         * dbxread.c (processing_acc_compilation): New global.
5100         * buildsym.h (processing_acc_compilation): Don't declare.
5101
5102 2018-07-16  Tom Tromey  <tom@tromey.com>
5103
5104         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5105         * dbxread.c (read_ofile_symtab): Update.
5106         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5107         * buildsym.h (last_source_start_addr): Remove.
5108         (set_last_source_start_addr, get_last_source_start_addr):
5109         Declare.
5110         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5111         parameter.
5112         (struct buildsym_compunit) <m_last_source_start_addr>: New
5113         member.
5114         (prepare_for_building): Remove start_addr parameter.
5115         (start_symtab, restart_symtab, end_symtab_get_static_block)
5116         (end_symtab_with_blockvector): Update.
5117         (set_last_source_start_addr, get_last_source_start_addr): New
5118         functions.
5119
5120 2018-07-16  Tom Tromey  <tom@tromey.com>
5121
5122         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5123         member.
5124         (have_line_numbers): Remove.
5125         (record_line, prepare_for_building, end_symtab_get_static_block)
5126         (augment_type_symtab): Update.
5127
5128 2018-07-16  Tom Tromey  <tom@tromey.com>
5129
5130         * buildsym.c (~buildsym_compunit): Free the macro table.
5131         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5132         methods.
5133         <m_pending_macros>: New member.
5134         (pending_macros): Remove.
5135         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5136         (reset_symtab_globals, end_symtab_get_static_block)
5137         (end_symtab_with_blockvector, augment_type_symtab)
5138         (buildsym_init): Update.
5139
5140 2018-07-16  Tom Tromey  <tom@tromey.com>
5141
5142         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5143         parameter.
5144         (buildsym_compunit::set_last_source_file): New method.
5145         <m_last_source_file>: New member.
5146         (prepare_for_building): Remove "name" parameter.
5147         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5148         (last_source_file): Remove.
5149         (set_last_source_file, get_last_source_file): Update.
5150
5151 2018-07-16  Tom Tromey  <tom@tromey.com>
5152
5153         * buildsym.c (prepare_for_building): Add assert.
5154
5155 2018-07-16  Tom Tromey  <tom@tromey.com>
5156
5157         * buildsym.c (~buildsym_compunit): Update.
5158         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5159         (start_subfile, patch_subfile_names)
5160         (end_symtab_with_blockvector): Update.
5161
5162 2018-07-16  Tom Tromey  <tom@tromey.com>
5163
5164         * buildsym.c (struct buildsym_compunit): Add constructor,
5165         destructor, initializers.
5166         (start_buildsym_compunit): Remove.
5167         (free_buildsym_compunit): Use "delete".
5168         (start_symtab, restart_symtab): Use "new".
5169
5170 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5171
5172         * symfile.c (set_objfile_default_section_offset): Remove struct
5173         keyword.
5174
5175 2018-07-14  Stafford Horne  <shorne@gmail.com>
5176
5177         * (Responsible Maintainers): Add myself as or1k maintainer.
5178
5179 2018-07-13  Tom Tromey  <tom@tromey.com>
5180
5181         * symfile.c (set_objfile_default_section_offset): Use extra braces
5182         around initializer.
5183
5184 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5185
5186         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5187         non-branching basr.
5188
5189 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5190
5191         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5192         unittests/cli-utils-selftests.c
5193         * unittests/cli-utils-selftests.c: New file.
5194
5195 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5196
5197         * NEWS: Mention new commands. Mention change to 'thread apply'.
5198
5199 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5200
5201         * thread.c (thr_try_catch_cmd): New function.
5202         (thread_apply_all_command): Handle qcs flags.
5203         (thread_apply_command): Handle qcs flags.
5204         (taas_command): New function.
5205         (tfaas_command): New function.
5206         (_initialize_thread): Update to setup the new commands 'taas
5207         and 'tfaas'. Change doc string for 'thread apply'.
5208
5209 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5210
5211         * stack.c: (trailing_outermost_frame): New function, mostly
5212         extracted from backtrace_command_1.
5213         (leading_innermost_frame): New function.
5214         (backtrace_command_1): Update to call trailing_outermost_frame.
5215         (frame_apply_command_count): New function.
5216         (frame_apply_level_command): New function.
5217         (frame_apply_all_command): New function.
5218         (frame_apply_command): New function.
5219         (faas_command): New function.
5220         (frame_cmd_list): New variable.
5221         (_initialize_stack): Update to setup the new commands 'frame apply'
5222         and 'faas'.
5223
5224 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5225
5226         * cli-utils.c (number_or_range_parser::get_number): Only handle
5227         numbers or convenience var as numbers.
5228         (parse_flags): New function.
5229         (parse_flags_qcs): New function.
5230         (number_or_range_parser::finished): Ensure parsing end is detected
5231         before end of string.
5232         * cli-utils.h (parse_flags): New function.
5233         (parse_flags_qcs): New function.
5234         (number_or_range_parser): Remove m_finished bool.
5235         (number_or_range_parser::skip_range): Set m_in_range to false.
5236
5237 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5238
5239         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5240         on Windows.
5241
5242 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5243             Jan Kratochvil  <jan.kratochvil@redhat.com>
5244             Paul Fertser  <fercerpav@gmail.com>
5245             Tsutomu Seki  <sekiriki@gmail.com>
5246             Pedro Alves  <palves@redhat.com>
5247
5248         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5249         'unittests/parse-connection-spec-selftests.c'.
5250         (COMMON_SFILES): Add 'common/netstuff.c'.
5251         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5252         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5253         * common/netstuff.c: New file.
5254         * common/netstuff.h: New file.
5255         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5256         (wait_for_connect): Update comment.  New parameter
5257         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5258         Use 'sock' directly instead of 'scb->fd'.
5259         (try_connect): New function, with code from 'net_open'.
5260         (net_open): Rewrite main loop to deal with multiple
5261         sockets/addresses.  Handle IPv6-style hostnames; implement
5262         support for IPv6 connections.
5263         * unittests/parse-connection-spec-selftests.c: New file.
5264
5265 2018-07-11  Pedro Alves  <palves@redhat.com>
5266
5267         PR gdb/23377
5268         * remote.c (remote_target::remote_detach_pid): Call
5269         set_current_process.
5270
5271 2018-07-11  Pedro Alves  <palves@redhat.com>
5272
5273         * h8300-tdep.c (h8300_gdbarch_init): Remove
5274         set_gdbarch_ecoff_reg_to_regnum calls.
5275
5276 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5277
5278         PR c++/23373
5279         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5280         offsets/sizes for static members of a class/struct.
5281
5282 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5283
5284         * target-descriptions.c (tdesc_register_bitsize): Rename.
5285         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5286         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5287         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5288
5289 2018-07-10  Tom Tromey  <tom@tromey.com>
5290
5291         * breakpoint.c (moribund_locations): Now static and a
5292         std::vector.
5293         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5294         (build_bpstat_chain, update_global_location_list)
5295         (breakpoint_retire_moribund): Update.
5296         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5297         VEC.
5298
5299 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5300
5301         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5302         (riscv_register_reggroup_p): Use new function, remove unneeded
5303         parenthesis.
5304         (riscv_push_dummy_call): Extend assert to compare against xlen or
5305         flen based on register type.
5306
5307 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5308
5309         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5310
5311 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5312
5313         * remote.c (show_hardware_watchpoint_limit): New function.
5314         (show_hardware_watchpoint_length_limit): New function.
5315         (show_hardware_breakpoint_limit): New function.
5316         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5317         where appropriate, update help text.
5318
5319 2018-07-09  Tom Tromey  <tom@tromey.com>
5320
5321         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5322         (CLIBS): Don't mention NAT_CLIBS.
5323
5324 2018-07-09  Tom Tromey  <tom@tromey.com>
5325
5326         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5327         (LIBGDB_OBS, clean mostlyclean): Update.
5328         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5329
5330 2018-07-09  Tom Tromey  <tom@tromey.com>
5331
5332         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5333         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5334         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5335
5336 2018-07-09  Tom Tromey  <tom@tromey.com>
5337
5338         * Makefile.in (ALLDEPFILES): Remove exec.c.
5339         (COMMON_OBS): Remove exec.o.
5340         (COMMON_SFILES): Add exec.c.
5341
5342 2018-07-09  Tom Tromey  <tom@tromey.com>
5343
5344         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5345
5346 2018-07-09  Tom Tromey  <tom@tromey.com>
5347
5348         * Makefile.in (clean mostlyclean): Remove stamp-version.
5349         (version.c): Depend on stamp-version.
5350         (stamp-version): New rule, from version.c rule.
5351
5352 2018-07-09  Tom Tromey  <tom@tromey.com>
5353
5354         * Makefile.in (init.c): Depend on stamp-init.
5355         (stamp-init): New rule, from init.c rule.
5356         (clean mostlyclean): Remove stamp-init.
5357
5358 2018-07-09  Tom Tromey  <tom@tromey.com>
5359
5360         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5361         SUBDIR_GCC_COMPILE_SRCS.
5362
5363 2018-07-09  Tom Tromey  <tom@tromey.com>
5364
5365         * Makefile.in (init.c): Remove some unused sed rules.
5366
5367 2018-07-09  Tom Tromey  <tom@tromey.com>
5368
5369         * Makefile.in (TSOBS): Remove.
5370         (INIT_FILES): Update.
5371         (LIBGDB_OBS): Update.
5372         (COMMON_SFILES): Add inflow.c.
5373         (SFILES): Remove inflow.c.
5374
5375 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5376
5377         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5378
5379 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5380
5381         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5382         get_saveloc_name, is_signal_frame_name, step_name,
5383         init_remote_name, create_addr_space_name,
5384         destroy_addr_space_name, search_unwind_table_name,
5385         find_dyn_list_name): Constify.
5386
5387 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5388
5389         * darwin-nat.c (darwin_pthread_kill): New function.
5390         (darwin_resume_thread): Use darwin_pthread_kill.
5391
5392 2018-07-05  Tom de Vries  <tdevries@suse.de>
5393
5394         * macroexp.c (macro_buffer) <operator=>: New member function.
5395
5396 2018-07-04  Tom Tromey  <tom@tromey.com>
5397
5398         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5399
5400 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5401
5402         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5403         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5404         * maint.c: Likewise.
5405         * top.c: Likewise.
5406
5407 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5408
5409         * NEWS: Create a new section for the next release branch.
5410         Rename the section of the current branch, now that it has
5411         been cut.
5412
5413 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5414
5415         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5416         * version.in: Bump version to 8.2.50.DATE-git.
5417
5418 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5419             Pedro Alves  <palves@redhat.com>
5420
5421         * linux-nat.c (linux_init_ptrace): Rename to ...
5422         (linux_init_ptrace_procfs): ... this.  Call
5423         linux_proc_init_warnings.
5424         (linux_nat_target::post_attach)
5425         (linux_nat_target::post_startup_inferior): Adjust.
5426         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5427         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5428
5429 2018-07-04  Tom de Vries  <tdevries@suse.de>
5430
5431         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5432         check ...
5433         (read_comp_unit_head): ... here.
5434
5435 2018-07-03  Tom Tromey  <tom@tromey.com>
5436
5437         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5438         (stop_tracing, tstatus_command)
5439         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5440         (print_one_static_tracepoint_marker): Update.
5441         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5442         std::vector.
5443         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5444         VEC.
5445         (all_tracepoints, static_tracepoints_here): Return std::vector.
5446
5447 2018-07-03  Tom Tromey  <tom@tromey.com>
5448
5449         * common/ptid.c (ptid_equal): Remove.
5450         * common/ptid.h (ptid_equal): Don't declare.
5451         * ada-tasks.c: Update.
5452         * breakpoint.c: Update.
5453         * common/agent.c: Update.
5454         * corelow.c: Update.
5455         * darwin-nat-info.c: Update.
5456         * darwin-nat.c: Update.
5457         * dcache.c: Update.
5458         * dtrace-probe.c: Update.
5459         * dummy-frame.c: Update.
5460         * fbsd-nat.c: Update.
5461         * frame.c: Update.
5462         * gdbthread.h: Update.
5463         * gnu-nat.c: Update.
5464         * go32-nat.c: Update.
5465         * inf-loop.c: Update.
5466         * inf-ptrace.c: Update.
5467         * infcall.c: Update.
5468         * infcmd.c: Update.
5469         * inflow.c: Update.
5470         * infrun.c: Update.
5471         * linux-fork.c: Update.
5472         * linux-nat.c: Update.
5473         * linux-thread-db.c: Update.
5474         * mi/mi-cmd-var.c: Update.
5475         * mi/mi-interp.c: Update.
5476         * mi/mi-main.c: Update.
5477         * nto-procfs.c: Update.
5478         * ppc-linux-tdep.c: Update.
5479         * procfs.c: Update.
5480         * python/py-inferior.c: Update.
5481         * python/py-record-btrace.c: Update.
5482         * python/py-record.c: Update.
5483         * ravenscar-thread.c: Update.
5484         * regcache.c: Update.
5485         * remote-sim.c: Update.
5486         * remote.c: Update.
5487         * sol-thread.c: Update.
5488         * solib.c: Update.
5489         * target.c: Update.
5490         * tui/tui-stack.c: Update.
5491         * varobj.c: Update.
5492         * windows-nat.c: Update.
5493         * windows-tdep.c: Update.
5494
5495 2018-07-03  Tom Tromey  <tom@tromey.com>
5496
5497         * common/ptid.c (ptid_match): Remove.
5498         * common/ptid.h (ptid_match): Don't declare.
5499         * fbsd-nat.c: Update.
5500         * infcmd.c: Update.
5501         * infrun.c: Update.
5502         * linux-nat.c: Update.
5503         * record-btrace.c: Update.
5504         * regcache.c: Update.
5505         * remote.c: Update.
5506
5507 2018-07-03  Tom Tromey  <tom@tromey.com>
5508
5509         * common/ptid.c (ptid_tid_p): Remove.
5510         * common/ptid.h (ptid_tid_p): Don't declare.
5511         * sol-thread.c: Update.
5512
5513 2018-07-03  Tom Tromey  <tom@tromey.com>
5514
5515         * common/ptid.c (ptid_lwp_p): Remove.
5516         * common/ptid.h (ptid_lwp_p): Don't declare.
5517         * fbsd-nat.c: Update.
5518         * linux-nat.c: Update.
5519         * nat/linux-procfs.c: Update.
5520         * nat/x86-linux-dregs.c: Update.
5521         * sol-thread.c: Update.
5522
5523 2018-07-03  Tom Tromey  <tom@tromey.com>
5524
5525         * common/ptid.c (ptid_is_pid): Remove.
5526         * common/ptid.h (ptid_is_pid): Don't declare.
5527         * infrun.c: Update.
5528         * linux-nat.c: Update.
5529         * mi/mi-interp.c: Update.
5530         * remote.c: Update.
5531         * thread.c: Update.
5532
5533 2018-07-03  Tom Tromey  <tom@tromey.com>
5534
5535         * common/ptid.c (ptid_get_tid): Remove.
5536         * common/ptid.h (ptid_get_tid): Don't declare.
5537         * ada-tasks.c: Update.
5538         * aix-thread.c: Update.
5539         * bsd-uthread.c: Update.
5540         * darwin-nat.c: Update.
5541         * fbsd-nat.c: Update.
5542         * i386-darwin-nat.c: Update.
5543         * infrun.c: Update.
5544         * linux-tdep.c: Update.
5545         * nto-procfs.c: Update.
5546         * ppc-ravenscar-thread.c: Update.
5547         * python/py-infthread.c: Update.
5548         * ravenscar-thread.c: Update.
5549         * sol-thread.c: Update.
5550         * sparc-ravenscar-thread.c: Update.
5551         * windows-nat.c: Update.
5552
5553 2018-07-03  Tom Tromey  <tom@tromey.com>
5554
5555         * common/ptid.c (ptid_get_lwp): Remove.
5556         * common/ptid.h (ptid_get_lwp): Don't declare.
5557         * aarch64-linux-nat.c: Update.
5558         * ada-tasks.c: Update.
5559         * aix-thread.c: Update.
5560         * amd64-linux-nat.c: Update.
5561         * arm-linux-nat.c: Update.
5562         * corelow.c: Update.
5563         * fbsd-nat.c: Update.
5564         * fbsd-tdep.c: Update.
5565         * gnu-nat.c: Update.
5566         * i386-cygwin-tdep.c: Update.
5567         * i386-gnu-nat.c: Update.
5568         * i386-linux-nat.c: Update.
5569         * ia64-linux-nat.c: Update.
5570         * inf-ptrace.c: Update.
5571         * infrun.c: Update.
5572         * linux-fork.c: Update.
5573         * linux-nat.c: Update.
5574         * linux-tdep.c: Update.
5575         * linux-thread-db.c: Update.
5576         * mips-linux-nat.c: Update.
5577         * nat/aarch64-linux-hw-point.c: Update.
5578         * nat/aarch64-linux.c: Update.
5579         * nat/linux-btrace.c: Update.
5580         * nat/linux-osdata.c: Update.
5581         * nat/linux-procfs.c: Update.
5582         * nat/x86-linux-dregs.c: Update.
5583         * obsd-nat.c: Update.
5584         * ppc-fbsd-nat.c: Update.
5585         * ppc-linux-nat.c: Update.
5586         * procfs.c: Update.
5587         * python/py-infthread.c: Update.
5588         * ravenscar-thread.c: Update.
5589         * remote.c: Update.
5590         * s390-linux-nat.c: Update.
5591         * sol-thread.c: Update.
5592         * sol2-tdep.c: Update.
5593         * spu-linux-nat.c: Update.
5594         * x86-linux-nat.c: Update.
5595         * xtensa-linux-nat.c: Update.
5596
5597 2018-07-03  Tom Tromey  <tom@tromey.com>
5598
5599         * common/ptid.c (ptid_get_pid): Remove.
5600         * common/ptid.h (ptid_get_pid): Don't declare.
5601         * aarch64-linux-nat.c: Update.
5602         * ada-lang.c: Update.
5603         * aix-thread.c: Update.
5604         * alpha-bsd-nat.c: Update.
5605         * amd64-fbsd-nat.c: Update.
5606         * amd64-linux-nat.c: Update.
5607         * arm-linux-nat.c: Update.
5608         * arm-nbsd-nat.c: Update.
5609         * auxv.c: Update.
5610         * break-catch-syscall.c: Update.
5611         * breakpoint.c: Update.
5612         * bsd-uthread.c: Update.
5613         * corelow.c: Update.
5614         * ctf.c: Update.
5615         * darwin-nat.c: Update.
5616         * fbsd-nat.c: Update.
5617         * fbsd-tdep.c: Update.
5618         * gcore.c: Update.
5619         * gnu-nat.c: Update.
5620         * hppa-nbsd-nat.c: Update.
5621         * hppa-obsd-nat.c: Update.
5622         * i386-fbsd-nat.c: Update.
5623         * ia64-linux-nat.c: Update.
5624         * inf-ptrace.c: Update.
5625         * infcmd.c: Update.
5626         * inferior.c: Update.
5627         * inferior.h: Update.
5628         * inflow.c: Update.
5629         * infrun.c: Update.
5630         * linux-fork.c: Update.
5631         * linux-nat.c: Update.
5632         * linux-tdep.c: Update.
5633         * linux-thread-db.c: Update.
5634         * m68k-bsd-nat.c: Update.
5635         * mi/mi-interp.c: Update.
5636         * mi/mi-main.c: Update.
5637         * mips-linux-nat.c: Update.
5638         * mips-nbsd-nat.c: Update.
5639         * mips64-obsd-nat.c: Update.
5640         * nat/aarch64-linux-hw-point.c: Update.
5641         * nat/aarch64-linux.c: Update.
5642         * nat/linux-btrace.c: Update.
5643         * nat/linux-osdata.c: Update.
5644         * nat/linux-procfs.c: Update.
5645         * nat/x86-linux-dregs.c: Update.
5646         * nto-procfs.c: Update.
5647         * obsd-nat.c: Update.
5648         * ppc-linux-nat.c: Update.
5649         * ppc-nbsd-nat.c: Update.
5650         * ppc-obsd-nat.c: Update.
5651         * proc-service.c: Update.
5652         * procfs.c: Update.
5653         * python/py-inferior.c: Update.
5654         * python/py-infthread.c: Update.
5655         * ravenscar-thread.c: Update.
5656         * record.c: Update.
5657         * remote-sim.c: Update.
5658         * remote.c: Update.
5659         * rs6000-nat.c: Update.
5660         * s390-linux-nat.c: Update.
5661         * sh-nbsd-nat.c: Update.
5662         * sol-thread.c: Update.
5663         * sparc-nat.c: Update.
5664         * sparc64-tdep.c: Update.
5665         * spu-linux-nat.c: Update.
5666         * spu-tdep.c: Update.
5667         * target-debug.h: Update.
5668         * target.c: Update.
5669         * thread.c: Update.
5670         * tid-parse.c: Update.
5671         * tracefile-tfile.c: Update.
5672         * vax-bsd-nat.c: Update.
5673         * windows-nat.c: Update.
5674         * x86-linux-nat.c: Update.
5675         * x86-nat.c: Update.
5676
5677 2018-07-03  Tom Tromey  <tom@tromey.com>
5678
5679         * common/ptid.c (pid_to_ptid): Remove.
5680         * common/ptid.h (pid_to_ptid): Don't declare.
5681         * aix-thread.c: Update.
5682         * arm-linux-nat.c: Update.
5683         * common/ptid.c: Update.
5684         * common/ptid.h: Update.
5685         * corelow.c: Update.
5686         * ctf.c: Update.
5687         * darwin-nat.c: Update.
5688         * fbsd-nat.c: Update.
5689         * fork-child.c: Update.
5690         * gnu-nat.c: Update.
5691         * go32-nat.c: Update.
5692         * inf-ptrace.c: Update.
5693         * infcmd.c: Update.
5694         * inferior.c: Update.
5695         * infrun.c: Update.
5696         * linux-fork.c: Update.
5697         * linux-nat.c: Update.
5698         * nat/aarch64-linux-hw-point.c: Update.
5699         * nat/fork-inferior.c: Update.
5700         * nat/x86-linux-dregs.c: Update.
5701         * nto-procfs.c: Update.
5702         * obsd-nat.c: Update.
5703         * procfs.c: Update.
5704         * progspace.c: Update.
5705         * remote.c: Update.
5706         * rs6000-nat.c: Update.
5707         * s390-linux-nat.c: Update.
5708         * sol-thread.c: Update.
5709         * spu-linux-nat.c: Update.
5710         * target.c: Update.
5711         * top.c: Update.
5712         * tracefile-tfile.c: Update.
5713         * windows-nat.c: Update.
5714
5715 2018-07-03  Tom Tromey  <tom@tromey.com>
5716
5717         * common/ptid.h (ptid_build): Don't declare.
5718         * common/ptid.c (ptid_build): Remove.
5719         * aix-thread.c: Update.
5720         * bsd-kvm.c: Update.
5721         * bsd-uthread.c: Update.
5722         * common/agent.c: Update.
5723         * common/ptid.c: Update.
5724         * common/ptid.h: Update.
5725         * corelow.c: Update.
5726         * darwin-nat.c: Update.
5727         * fbsd-nat.c: Update.
5728         * gnu-nat.c: Update.
5729         * linux-fork.c: Update.
5730         * linux-nat.c: Update.
5731         * linux-thread-db.c: Update.
5732         * nat/linux-osdata.c: Update.
5733         * nat/linux-procfs.c: Update.
5734         * nto-procfs.c: Update.
5735         * obsd-nat.c: Update.
5736         * proc-service.c: Update.
5737         * procfs.c: Update.
5738         * ravenscar-thread.c: Update.
5739         * remote-sim.c: Update.
5740         * remote.c: Update.
5741         * sol-thread.c: Update.
5742         * target.c: Update.
5743         * windows-nat.c: Update.
5744
5745 2018-07-03  Tom Tromey  <tom@tromey.com>
5746
5747         * infrun.c (follow_exec): Use exit_inferior_silent.
5748         * inferior.c (exit_inferior_num_silent): Remove.
5749         * inferior.h (exit_inferior_num_silent): Don't declare.
5750
5751 2018-07-03  Tom Tromey  <tom@tromey.com>
5752
5753         PR cli/23340:
5754         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5755         inferior_ptid on error.
5756
5757 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5758             Simon Marchi  <simon.marchi@polymtl.ca>
5759
5760         PR tdep/8282
5761         * disasm.h (gdb_disassembler): Add
5762         `m_disassembler_options_holder'. member
5763         * disasm.c (get_all_disassembler_options): New function.
5764         (gdb_disassembler::gdb_disassembler): Use it.
5765         (gdb_buffered_insn_length_init_dis): Likewise.
5766         (gdb_buffered_insn_length): Adjust accordingly.
5767         (set_disassembler_options): Handle options with arguments.
5768         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5769         line if showing options with descriptions.
5770         (disassembler_options_completer): Adapt to using the
5771         `disasm_options_and_args_t' structure.
5772         * mips-tdep.c (mips_disassembler_options): New variable.
5773         (mips_disassembler_options_o32): Likewise.
5774         (mips_disassembler_options_n32): Likewise.
5775         (mips_disassembler_options_n64): Likewise.
5776         (gdb_print_insn_mips): Don't set `disassembler_options'.
5777         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5778         functions.
5779         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5780         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5781         `gdbarch_disassembler_options_implicit' and
5782         `gdbarch_valid_disassembler_options'.
5783         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5784         `disasm_options_and_args_t' structure.
5785         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5786         method.
5787         (valid_disassembler_options): Switch from `disasm_options_t' to
5788         the `disasm_options_and_args_t' structure.
5789         * NEWS: Document `set disassembler-options' support for the MIPS
5790         target.
5791         * gdbarch.h: Regenerate.
5792         * gdbarch.c: Regenerate.
5793
5794 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5795
5796         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5797
5798 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5799
5800         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5801         parameter in call to amd64_target_description.
5802         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5803         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5804         (amd64fbsd_init_abi): Likewise.
5805         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5806         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5807         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5808         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5809
5810 2018-06-29  Pedro Alves  <palves@redhat.com>
5811
5812         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5813         "segments" parameter.
5814         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5815         (_initialize_amd64_tdep): Update call to
5816         amd64_create_target_description.
5817         (amd64_target_description): Add "segments" parameter.  Adjust
5818         the implementation to use it.
5819         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5820         call to amd64_create_target_description.
5821         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5822         * gdb/arch/amd64.h (amd64_create_target_description): Add
5823         "segments" register.
5824         * gdb/arch/amd64.c (amd64_create_target_description): Add
5825         "segments" parameter.  Call create_feature_i386_64bit_segments
5826         only if SEGMENTS is true.
5827         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5828         call to amd64_create_target_description.
5829
5830 2018-06-29  Pedro Alves  <palves@redhat.com>
5831
5832         * thread.c (thread_target_id_str): New, factored out from ...
5833         (print_thread_info_1): ... here.  Use it to compute the max
5834         "Target Id" column width.
5835
5836 2018-06-29  Pedro Alves  <palves@redhat.com>
5837
5838         * remote.c (remote_target::extra_thread_info): Delete
5839         'display_buf' and 'n' locals.  from the cache, regardless of
5840         packet mechanims is in use.  Use cache for qThreadExtra and qP
5841         methods too.
5842
5843 2018-06-29  Pedro Alves  <palves@redhat.com>
5844
5845         * blockframe.c (find_pc_sect_containing_function): New function.
5846         * breakpoint.c (print_breakpoint_location): Don't call
5847         find_pc_sect_function.
5848         * linespec.c (create_sals_line_offset): Record the location's
5849         symbol in the sal.
5850         * linespec.c (convert_address_location_to_sals): Fill in sal's
5851         symbol with find_pc_sect_containing_function.
5852         * symtab.c (find_function_start_sal): Rename to ...
5853         (find_function_start_sal_1): ... this.
5854         (find_function_start_sal): Reimplement as wrapper around
5855         find_function_start_sal_1, and use
5856         find_pc_sect_containing_function to fill in the sal's symbol.
5857         (find_function_start_sal(symbol*, bool)): Adjust.
5858         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5859         comments.
5860         (find_pc_sect_containing_function): Declare.
5861
5862 2018-06-29  Pedro Alves  <palves@redhat.com>
5863
5864         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5865         true if the the location has no symbol.
5866
5867 2018-06-28  Tom Tromey  <tom@tromey.com>
5868
5869         * NEWS: Mention --enable-codesign.
5870         * silent-rules.mk (ECHO_SIGN): New variable.
5871         * configure.ac: Add --enable-codesign.
5872         * configure: Rebuild.
5873         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5874         (gdb$(EXEEXT)): Optionally invoke codesign.
5875
5876 2018-06-28  Pedro Alves  <palves@redhat.com>
5877
5878         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5879         comments.
5880         (switch_to_thread_no_regs): Adjust comment.
5881         * infcmd.c (stop_pc): Delete.
5882         (post_create_inferior, info_program_command): Replace references
5883         to stop_pc with references to thread_info->suspend.stop_pc.
5884         * inferior.h (stop_pc): Delete declaration.
5885         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5886         (handle_inferior_event_1, handle_signal_stop)
5887         (process_event_stop_test, keep_going_stepped_thread)
5888         (handle_step_into_function, handle_step_into_function_backward)
5889         (print_stop_location): Replace references to stop_pc with
5890         references to thread_info->suspend.stop_pc.
5891         (struct infcall_suspend_state) <stop_pc>: Delete field.
5892         (save_infcall_suspend_state, restore_infcall_suspend_state):
5893         Remove references to inf_stat->stop_pc.
5894         * linux-fork.c (fork_load_infrun_state): Likewise.
5895         * record-btrace.c (record_btrace_set_replay): Likewise.
5896         * record-full.c (record_full_goto_entry): Likewise.
5897         * remote.c (print_one_stopped_thread): Likewise.
5898         * target.c (target_resume): Extend comment.
5899         * thread.c (set_executing_thread): New.
5900         (set_executing): Use it.
5901         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5902         Remove references to stop_pc.
5903
5904 2018-06-28  Pedro Alves  <palves@redhat.com>
5905
5906         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5907         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5908
5909 2018-06-28  Tom Tromey  <tom@tromey.com>
5910
5911         * coffread.c (coff_symfile_finish): Update.
5912         * xcoffread.c (xcoff_symfile_finish): Update.
5913         * elfread.c (elf_symfile_finish): Update.
5914         * symfile.h (dwarf2_free_objfile): Don't declare.
5915         * dwarf2read.c (_initialize_dwarf2_read): Use
5916         register_objfile_data_with_cleanup.
5917         (dwarf2_free_objfile): Now static.  Change signature.
5918
5919 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5920
5921         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5922         option "-o" to add-symbol-file-load to add an offset to each
5923         section's load address.
5924         * symfile.c (set_objfile_default_section_offset): New function.
5925
5926 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5927
5928         * symfile.c (add_symbol_file_command): Make sure that sections
5929         with the same name are sorted in the same order.
5930
5931 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5932
5933         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5934         require the second argument.  If omitted, load sections at the
5935         addresses specified in the file.
5936
5937 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5938
5939         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5940         (_initialize_symfile): Add option "-o" to symbol-file to add an
5941         offset to each section of the symbol file.
5942
5943 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5944
5945         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5946
5947 2018-06-27  Tom Tromey  <tom@tromey.com>
5948
5949         * stack.c (_initialize_stack): Update "func" help text.
5950
5951 2018-06-27  Tom Tromey  <tom@tromey.com>
5952
5953         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5954         std::vector.
5955         (unwind_infopy_str, pyuw_create_unwind_info)
5956         (unwind_infopy_add_saved_register, pyuw_sniffer)
5957         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5958         Update.
5959         (struct saved_reg): Add constructor.
5960         <value>: Now a gdbpy_ref<>.
5961
5962 2018-06-27  Tom Tromey  <tom@tromey.com>
5963
5964         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5965
5966 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5967
5968         * gdb-gdb.py.in: Format using autopep8.
5969
5970 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5971
5972         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5973         (type_lookup_function): Recognize CORE_ADDR values.
5974
5975 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5976
5977         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5978         print tag_name.
5979
5980 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5981
5982         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5983         <__lt__>: Add.
5984
5985 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5986
5987         * gdb-gdb.py: Move to...
5988         * gdb-gdb.py.in: ... here.
5989         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5990         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5991         dependencies.
5992         (distclean): Remove gdb-gdb.py when cleaning.
5993         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5994         * configure: Re-generate.
5995
5996 2018-06-27  Pedro Alves  <palves@redhat.com>
5997
5998         * proc-service.c (get_ps_regcache): New.
5999         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6000         (ps_lsetfpregs): Use it.
6001
6002 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6003
6004         PR gdb/21695
6005         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6006         (dwarf_decode_lines_1): Adjust.
6007
6008 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6009
6010         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6011         override.
6012         <info_proc>: Likewise.
6013
6014 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6015
6016         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6017         to windows_fetch_one_register, and only handle the case of
6018         fetching one register.  Move the code that reloads the context
6019         and iterates over all registers if R is negative to...
6020         (windows_nat_target::fetch_registers): ... here.
6021         (do_windows_store_inferior_registers): Rename to
6022         windows_store_one_register, and only handle the case of storing
6023         one register.  Move the code that handles the case where r is
6024         negative to...
6025         (windows_nat_target::store_registers) ... here.
6026
6027 2018-06-26  Tom Tromey  <tom@tromey.com>
6028
6029         PR rust/22574:
6030         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6031         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6032         Update.
6033         (rust_internal_print_type): Add podata parameter.
6034         (rust_print_type): Update.
6035
6036 2018-06-26  Tom Tromey  <tom@tromey.com>
6037
6038         * typeprint.h (struct print_offset_data) <update, finish,
6039         maybe_print_hole>: New methods.
6040         <indentation>: New constant.
6041         * typeprint.c (print_offset_data::indentation): Define.
6042         (print_offset_data::maybe_print_hole, print_offset_data::update)
6043         (print_offset_data::finish): Move from c-typeprint.c and rename.
6044         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6045         (print_spaces_filtered_with_print_options): Update.
6046         (c_print_type_union_field_offset, maybe_print_hole)
6047         (c_print_type_struct_field_offset): Move to typeprint.c and
6048         rename.
6049         (c_type_print_base_struct_union): Update.
6050
6051 2018-06-25  Pedro Alves  <palves@redhat.com>
6052
6053         * gdbthread.h (thread_info_ref, delete_thread)
6054         (delete_thread_silent, first_thread_of_inferior)
6055         (any_thread_of_inferior, switch_to_thread)
6056         (enable_thread_stack_temporaries)
6057         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6058         (get_last_thread_stack_temporary)
6059         (value_in_thread_stack_temporaries, can_access_registers_thread):
6060         Spell out "struct thread_info" instead of just "thread_info".
6061         * inferior.h (notice_new_inferior): Likewise.
6062
6063 2018-06-25  Pedro Alves  <palves@redhat.com>
6064
6065         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6066         pass thread_info pointer to delete_thread.
6067         (windows_nat_target::detach): Pass inferior pointer to
6068         detach_inferior.
6069         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6070         delete_thread.
6071         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6072         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6073         and pass a thread_info pointer to delete_thread.
6074         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6075         pass thread_info pointer to delete_thread.
6076         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6077         delete_thread_silent call.
6078         * procfs.c (procfs_target::detach): Pass inferior pointer to
6079         detach_inferior.
6080         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6081         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6082         delete_thread_silent call.
6083         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6084         pass thread_info pointer to delete_thread.
6085         (windows_nat_target::detach): Pass inferior pointer to
6086         delete_inferior.
6087
6088 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6089
6090         * regcache.c (readable_regcache::read_part): Fix asserts.
6091         (reg_buffer::raw_collect_part): New function.
6092         (regcache::write_part): Fix asserts.
6093         (reg_buffer::raw_supply_part): New function.
6094         (regcache::transfer_regset_register): New helper function.
6095         (regcache::transfer_regset): Call new functions.
6096         (regcache_supply_regset): Use gdb_byte*.
6097         (regcache::supply_regset): Likewise.
6098         (regcache_collect_regset): Likewise.
6099         (regcache::collect_regset): Likewise.
6100         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6101         (reg_buffer::raw_supply_part): Likewise.
6102         (regcache::transfer_regset_register): Likewise.
6103         (regcache::transfer_regset): Use gdb_byte*.
6104
6105 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6106
6107         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6108
6109 2018-06-21  Pedro Alves  <palves@redhat.com>
6110
6111         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6112         instead of a ptid_t.  All callers adjusted.
6113         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6114         adjusted.
6115         (print_ada_task_info, display_current_task_id, task_command_1):
6116         Adjust.
6117         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6118         inferior_thread.
6119         (breakpoint_kind): Adjust.
6120         (remove_breakpoints_pid): Rename to ...
6121         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6122         pointer.  All callers adjusted.
6123         (bpstat_clear_actions): Use inferior_thread.
6124         (get_bpstat_thread): New.
6125         (bpstat_do_actions): Use it.
6126         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6127         to take a thread_info pointer.  All callers adjusted.
6128         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6129         (breakpoint_re_set_thread): Use inferior_thread.
6130         * breakpoint.h (struct inferior): Forward declare.
6131         (bpstat_stop_status): Update.
6132         (remove_breakpoints_pid): Delete.
6133         (remove_breakpoints_inf): New.
6134         * bsd-uthread.c (bsd_uthread_target::wait)
6135         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6136         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6137         (maint_btrace_packet_history_cmd)
6138         (maint_btrace_clear_packet_history_cmd): Adjust.
6139         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6140         inferior_thread.
6141         * cli/cli-interp.c: Include "inferior.h".
6142         * common/refcounted-object.h (struct
6143         refcounted_object_ref_policy): New.
6144         * compile/compile-object-load.c: Include gdbthread.h.
6145         (store_regs): Use inferior_thread.
6146         * corelow.c (core_target::close): Use current_inferior.
6147         (core_target_open): Adjust to use first_thread_of_inferior and use
6148         the current inferior.
6149         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6150         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6151         <thread>: ... this new field.  All references adjusted.
6152         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6153         Take a thread_info pointer instead of a ptid_t.
6154         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6155         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6156         thread_info pointer instead of a ptid_t.
6157         * elfread.c: Include "inferior.h".
6158         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6159         Use inferior_thread.
6160         * eval.c (evaluate_subexp): Likewise.
6161         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6162         inferior_thread.
6163         * gdb_proc_service.h (struct thread_info): Forward declare.
6164         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6165         <thread>: ... this new field.  All references adjusted.
6166         * gdbarch.h, gdbarch.c: Regenerate.
6167         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6168         'thread' parameter.  All implementations and callers adjusted.
6169         * gdbthread.h (thread_info) <set_running>: New method.
6170         (delete_thread, delete_thread_silent): Take a thread_info pointer
6171         instead of a ptid.
6172         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6173         (first_thread_of_process): Delete, replaced by ...
6174         (first_thread_of_inferior): ... this new function.  All callers
6175         adjusted.
6176         (any_live_thread_of_process): Delete, replaced by ...
6177         (any_live_thread_of_inferior): ... this new function.  All callers
6178         adjusted.
6179         (switch_to_thread, switch_to_no_thread): Declare.
6180         (is_executing): Delete.
6181         (enable_thread_stack_temporaries): Update comment.
6182         <enable_thread_stack_temporaries>: Take a thread_info pointer
6183         instead of a ptid_t.  Incref the thread.
6184         <~enable_thread_stack_temporaries>: Decref the thread.
6185         <m_ptid>: Delete
6186         <m_thr>: New.
6187         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6188         (get_last_thread_stack_temporary)
6189         (value_in_thread_stack_temporaries, can_access_registers_thread):
6190         Take a thread_info pointer instead of a ptid_t.  All callers
6191         adjusted.
6192         * infcall.c (get_call_return_value): Use inferior_thread.
6193         (run_inferior_call): Work with thread pointers instead of ptid_t.
6194         (call_function_by_hand_dummy): Work with thread pointers instead
6195         of ptid_t.  Use thread_info_ref.
6196         * infcmd.c (proceed_thread_callback): Access thread's state
6197         directly.
6198         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6199         access thread's state directly.
6200         (continue_command): Use inferior_thread.
6201         (info_program_command): Use find_thread_ptid and access thread
6202         state directly.
6203         (proceed_after_attach_callback): Use thread state directly.
6204         (notice_new_inferior): Take a thread_info pointer instead of a
6205         ptid_t.  All callers adjusted.
6206         (exit_inferior): Take an inferior pointer instead of a pid.  All
6207         callers adjusted.
6208         (exit_inferior_silent): New.
6209         (detach_inferior): Delete.
6210         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6211         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6212         (detach_inferior_command, kill_inferior_command): Use
6213         find_inferior_id instead of valid_gdb_inferior_id and
6214         gdb_inferior_id_to_pid.
6215         (inferior_command): Use inferior and thread pointers.
6216         * inferior.h (struct thread_info): Forward declare.
6217         (notice_new_inferior): Take a thread_info pointer instead of a
6218         ptid_t.  All callers adjusted.
6219         (detach_inferior): Delete declaration.
6220         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6221         instead of a pid.  All callers adjusted.
6222         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6223         (valid_gdb_inferior_id): Delete.
6224         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6225         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6226         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6227         ...
6228         <inf>: ... this new field.
6229         <step_ptid>: Delete, replaced by ...
6230         <step_thread>: ... this new field.
6231         (get_displaced_stepping_state): Take an inferior pointer instead
6232         of a pid.  All callers adjusted.
6233         (displaced_step_in_progress_any_inferior): Adjust.
6234         (displaced_step_in_progress_thread): Take a thread pointer instead
6235         of a ptid_t.  All callers adjusted.
6236         (displaced_step_in_progress, add_displaced_stepping_state): Take
6237         an inferior pointer instead of a pid.  All callers adjusted.
6238         (get_displaced_step_closure_by_addr): Adjust.
6239         (remove_displaced_stepping_state): Take an inferior pointer
6240         instead of a pid.  All callers adjusted.
6241         (displaced_step_prepare_throw, displaced_step_prepare)
6242         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6243         All callers adjusted.
6244         (start_step_over): Adjust.
6245         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6246         displaced step queue.
6247         (do_target_resume): Adjust.
6248         (fetch_inferior_event): Use inferior_thread.
6249         (context_switch, get_inferior_stop_soon): Take an
6250         execution_control_state pointer instead of a ptid_t.  All callers
6251         adjusted.
6252         (switch_to_thread_cleanup): Delete.
6253         (stop_all_threads): Use scoped_restore_current_thread.
6254         * inline-frame.c: Include "gdbthread.h".
6255         (inline_state) <inline_state>: Take a thread pointer instead of a
6256         ptid_t.  All callers adjusted.
6257         <ptid>: Delete, replaced by ...
6258         <thread>: ... this new field.
6259         (find_inline_frame_state): Take a thread pointer instead of a
6260         ptid_t.  All callers adjusted.
6261         (skip_inline_frames, step_into_inline_frame)
6262         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6263         pointer instead of a ptid_t.  All callers adjusted.
6264         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6265         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6266         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6267         pointers directly.
6268         * linux-nat.c (get_detach_signal): Likewise.
6269         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6270         (thread_db_notice_clone): Adjust.
6271         (thread_db_find_new_threads_silently)
6272         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6273         a thread pointer instead of a ptid_t.  All callers adjusted.
6274         * mi/mi-cmd-var.c: Include "inferior.h".
6275         (mi_cmd_var_update_iter): Update to use thread pointers.
6276         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6277         inferior directly.
6278         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6279         out to ...
6280         (mi_output_running): ... this new function.
6281         (mi_on_resume_1): Adjust to use it.
6282         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6283         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6284         directly.
6285         (interrupt_thread_callback): : Adjust to use thread and inferior
6286         pointers.
6287         * proc-service.c: Include "gdbthread.h".
6288         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6289         * progspace-and-thread.c: Include "inferior.h".
6290         * progspace.c: Include "inferior.h".
6291         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6292         hold a reference to an inferior_object.
6293         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6294         inferior_thread.
6295         * python/py-inferior.c (struct inferior_object): Give the type a
6296         tag name instead of a typedef.
6297         (python_on_normal_stop): No need to check if the current thread is
6298         listed.
6299         (inferior_to_inferior_object): Change return type to
6300         inferior_object.  All callers adjusted.
6301         (find_thread_object): Delete, bits factored out to ...
6302         (thread_to_thread_object): ... this new function.
6303         * python/py-infthread.c (create_thread_object): Use
6304         inferior_to_inferior_object.
6305         (thpy_is_stopped): Use thread pointer directly.
6306         (gdbpy_selected_thread): Use inferior_thread.
6307         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6308         field, replaced with ...
6309         <thread>: ... this new field.  All users adjusted.
6310         (btpy_insn_or_gap_new): Drop const.
6311         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6312         callers adjusted.
6313         * python/py-record.c: Include "gdbthread.h".
6314         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6315         a ptid_t.  All callers adjusted.
6316         (gdbpy_current_recording): Use inferior_thread.
6317         * python/py-record.h (recpy_record_object) <ptid>: Delete
6318         field, replaced with ...
6319         <thread>: ... this new field.  All users adjusted.
6320         (recpy_element_object) <ptid>: Delete
6321         field, replaced with ...
6322         <thread>: ... this new field.  All users adjusted.
6323         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6324         a ptid_t.  All callers adjusted.
6325         * python/py-threadevent.c: Include "gdbthread.h".
6326         (get_event_thread): Use thread_to_thread_object.
6327         * python/python-internal.h (struct inferior_object): Forward
6328         declare.
6329         (find_thread_object, find_inferior_object): Delete declarations.
6330         (thread_to_thread_object, inferior_to_inferior_object): New
6331         declarations.
6332         * record-btrace.c: Include "inferior.h".
6333         (require_btrace_thread): Use inferior_thread.
6334         (record_btrace_frame_sniffer)
6335         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6336         (get_thread_current_frame): Use scoped_restore_current_thread and
6337         switch_to_thread.
6338         (get_thread_current_frame): Use thread pointer directly.
6339         (record_btrace_replay_at_breakpoint): Use thread's inferior
6340         pointer directly.
6341         * record-full.c: Include "inferior.h".
6342         * regcache.c: Include "gdbthread.h".
6343         (get_thread_arch_regcache): Use the inferior's address space
6344         directly.
6345         (get_thread_regcache, registers_changed_thread): New.
6346         * regcache.h (get_thread_regcache(thread_info *thread)): New
6347         overload.
6348         (registers_changed_thread): New.
6349         (remote_target) <remote_detach_1>: Swap order of parameters.
6350         (remote_add_thread): <remote_add_thread>: Return the new thread.
6351         (get_remote_thread_info(ptid_t)): New overload.
6352         (remote_target::remote_notice_new_inferior): Use thread pointers
6353         directly.
6354         (remote_target::process_initial_stop_replies): Use
6355         thread_info::set_running.
6356         (remote_target::remote_detach_1, remote_target::detach)
6357         (extended_remote_target::detach): Adjust.
6358         * stack.c (frame_show_address): Use inferior_thread.
6359         * target-debug.h (target_debug_print_thread_info_pp): New.
6360         * target-delegates.c: Regenerate.
6361         * target.c (default_thread_address_space): Delete.
6362         (memory_xfer_partial_1): Use current_inferior.
6363         (target_detach): Use current_inferior.
6364         (target_thread_address_space): Delete.
6365         (generic_mourn_inferior): Use current_inferior.
6366         * target.h (struct target_ops) <thread_address_space>: Delete.
6367         (target_thread_address_space): Delete.
6368         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6369         pointers directly.
6370         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6371         thread pointer instead of a ptid_t.  Adjust all callers.
6372         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6373         (first_thread_of_process): Delete, replaced by ...
6374         (first_thread_of_inferior): ... this new function.  All callers
6375         adjusted.
6376         (any_thread_of_process): Rename to ...
6377         (any_thread_of_inferior): ... this, and take an inferior pointer.
6378         (any_live_thread_of_process): Rename to ...
6379         (any_live_thread_of_inferior): ... this, and take an inferior
6380         pointer.
6381         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6382         (value_in_thread_stack_temporaries)
6383         (get_last_thread_stack_temporary): Take a thread pointer instead
6384         of a ptid_t.  Adjust all callers.
6385         (thread_info::set_running): New.
6386         (validate_registers_access): Use inferior_thread.
6387         (can_access_registers_ptid): Rename to ...
6388         (can_access_registers_thread): ... this, and take a thread
6389         pointer.
6390         (print_thread_info_1): Adjust to compare thread pointers instead
6391         of ptids.
6392         (switch_to_no_thread, switch_to_thread): Make extern.
6393         (scoped_restore_current_thread::~scoped_restore_current_thread):
6394         Use m_thread pointer directly.
6395         (scoped_restore_current_thread::scoped_restore_current_thread):
6396         Use inferior_thread.
6397         (thread_command): Use thread pointer directly.
6398         (thread_num_make_value_helper): Use inferior_thread.
6399         * top.c (execute_command): Use inferior_thread.
6400         * tui/tui-interp.c: Include "inferior.h".
6401         * varobj.c (varobj_create): Use inferior_thread.
6402         (value_of_root_1): Use find_thread_global_id instead of
6403         global_thread_id_to_ptid.
6404
6405 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6406
6407         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6408         possible.
6409         (regcache::write_part): Likewise.
6410         (readable_regcache::cooked_read_part): Update comment.
6411         (readable_regcache::cooked_write_part): Likewise.
6412         * regcache.h: (readable_regcache::read_part): Likewise.
6413         (regcache::write_part): Likewise.
6414
6415 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6416             Dirk Schubert  <dirk.schubert@arm.com>
6417
6418         * aarch64-linux-nat.c (post_attach): New.
6419         (aarch64_linux_nat_target::post_attach): Override post_attach to
6420         record the number of hardware debug registers.
6421
6422 2018-06-20  Tom Tromey  <tom@tromey.com>
6423
6424         * python/py-param.c (add_setshow_generic): Make parameters const.
6425         (parmpy_init): Update.
6426
6427 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6428
6429         * regcache.h (regcache_cooked_read_ftype): Rename to...
6430         (register_read_ftype): ...this, change type to function_view.
6431         (class reg_buffer) <save>: Remove src parameter.
6432         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6433         parameter non-const in first overload.  Remove src parameter in
6434         second overload.
6435         * regcache.c (do_cooked_read): Remove.
6436         (readonly_detached_regcache::readonly_detached_regcache): Make
6437         parameter non-const, adjust call to other constructor.
6438         (reg_buffer::save): Remove src parameter.
6439         * frame.c (do_frame_register_read): Remove.
6440         (frame_save_as_regcache): Use lambda function.
6441         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6442         parameter to ppu2spu_data *.
6443         (ppu2spu_sniffer): Use lambda function.
6444
6445 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6446
6447         * record-full.c (record_full_target::insert_breakpoint): Remove
6448         "struct" keyword, add const.
6449
6450 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6451
6452         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6453         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6454         * configure.ac: Remove AC_PREREQ, add missing quoting.
6455         * gnulib/configure.ac: Modernize usage of
6456         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6457         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6458         (AUTOMAKE_VERSION): Bump to 1.15.1.
6459         * configure: Re-generate.
6460         * config.in: Re-generate.
6461         * aclocal.m4: Re-generate.
6462         * gnulib/aclocal.m4: Re-generate.
6463         * gnulib/config.in: Re-generate.
6464         * gnulib/configure: Re-generate.
6465         * gnulib/import/Makefile.in: Re-generate.
6466
6467 2018-06-19  Pedro Alves  <palves@redhat.com>
6468
6469         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6470         (lookup_minimal_symbol_by_pc_section): ... here with
6471         gdb_assert_not_reached added.
6472
6473 2018-06-19  Pedro Alves  <palves@redhat.com>
6474
6475         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6476         parameter with a block parameter.  Compare location's block symbol
6477         with the frame's block instead of addresses.
6478         (skip_inline_frames): Pass the current block instead of the
6479         frame's address.  Break out as soon as we determine the frame
6480         should not be skipped.
6481
6482 2018-06-18  Tom Tromey  <tom@tromey.com>
6483
6484         * solib-aix.c (solib_aix_get_section_offsets): Return
6485         unique_xmalloc_ptr.
6486         (solib_aix_solib_create_inferior_hook): Update.
6487
6488 2018-06-18  Tom Tromey  <tom@tromey.com>
6489
6490         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6491
6492 2018-06-18  Tom Tromey  <tom@tromey.com>
6493
6494         * solib-frv.c (frv_relocate_main_executable): Use
6495         unique_xmalloc_ptr.
6496         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6497         unique_xmalloc_ptr.
6498
6499 2018-06-18  Tom Tromey  <tom@tromey.com>
6500
6501         * objfiles.h (inhibit_section_map_updates): Update.
6502         (resume_section_map_updates, resume_section_map_updates_cleanup):
6503         Remove.
6504         * solib-svr4.c (svr4_handle_solib_event): Update.
6505         * objfiles.c (inhibit_section_map_updates): Return
6506         scoped_restore_tmpl<int>.
6507         (resume_section_map_updates, resume_section_map_updates_cleanup):
6508         Remove.
6509
6510 2018-06-18  Tom Tromey  <tom@tromey.com>
6511
6512         * valprint.h (read_string): Update.
6513         * valprint.c (read_string): Change type of "buffer".
6514         (val_print_string): Update.
6515         * python/py-value.c (valpy_string): Update.
6516         * language.h (struct language_defn) <la_get_string>: Change
6517         type of "buffer".
6518         (default_get_string, c_get_string): Update.
6519         * language.c (default_get_string): Change type of "buffer".
6520         * guile/scm-value.c (gdbscm_value_to_string): Update.
6521         * c-lang.c (c_get_string): Change type of "buffer".
6522
6523 2018-06-18  Tom Tromey  <tom@tromey.com>
6524
6525         * ser-mingw.c (struct pipe_state_destroyer): New.
6526         (pipe_state_up): New typedef.
6527         (cleanup_pipe_state): Remove.
6528         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6529
6530 2018-06-18  Tom Tromey  <tom@tromey.com>
6531
6532         * rust-lang.h (rust_yyerror): Don't declare.
6533         * rust-lang.c (rust_language_defn): Update.
6534         * rust-exp.y (yyerror): Now static.
6535         * parse.c (parse_exp_in_context_1): Update.
6536         * p-lang.h (p_yyerror): Don't declare.
6537         * p-lang.c (p_language_defn): Update.
6538         * p-exp.y (yyerror): Now static.
6539         * opencl-lang.c (opencl_language_defn): Update.
6540         * objc-lang.c (objc_language_defn): Update.
6541         * m2-lang.h (m2_yyerror): Don't declare.
6542         * m2-lang.c (m2_language_defn): Update.
6543         * m2-exp.y (yyerror): Now static.
6544         * language.h (struct language_defn) <la_error>: Remove.
6545         * language.c (unk_lang_error): Remove.
6546         (unknown_language_defn, auto_language_defn): Remove.
6547         * go-lang.h (go_yyerror): Don't declare.
6548         * go-lang.c (go_language_defn): Update.
6549         * go-exp.y (yyerror): Now static.
6550         * f-lang.h (f_yyerror): Don't declare.
6551         * f-lang.c (f_language_defn): Update.
6552         * f-exp.y (yyerror): Now static.
6553         * d-lang.h (d_yyerror): Don't declare.
6554         * d-lang.c (d_language_defn): Update.
6555         * d-exp.y (yyerror): Now static.
6556         * c-lang.h (c_yyerror): Don't declare.
6557         * c-lang.c (c_language_defn, cplus_language_defn)
6558         (asm_language_defn, minimal_language_defn): Update.
6559         * c-exp.y (yyerror): Now static.
6560         * ada-lang.h (ada_yyerror): Don't declare.
6561         * ada-lang.c (ada_language_defn): Update.
6562         * ada-exp.y (yyerror): Now static.
6563
6564 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6565
6566         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6567         (store_sveregs_to_thread): Likewise.
6568         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6569         (aarch64_linux_store_inferior_registers): Likewise.
6570         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6571         function.
6572         (aarch64_sve_regs_copy_to_regcache): Likewise.
6573         (aarch64_sve_regs_copy_from_regcache): Likewise.
6574         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6575         declaration.
6576         (aarch64_sve_regs_copy_to_regcache): Likewise.
6577         (aarch64_sve_regs_copy_from_regcache): Likewise.
6578         (sve_context): Structure from Linux headers.
6579         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6580         (SVE_SIG_ZREG_SIZE): Likewise.
6581         (SVE_SIG_PREG_SIZE): Likewise.
6582         (SVE_SIG_FFR_SIZE): Likewise.
6583         (SVE_SIG_REGS_OFFSET): Likewise.
6584         (SVE_SIG_ZREGS_OFFSET): Likewise.
6585         (SVE_SIG_ZREG_OFFSET): Likewise.
6586         (SVE_SIG_ZREGS_SIZE): Likewise.
6587         (SVE_SIG_PREGS_OFFSET): Likewise.
6588         (SVE_SIG_PREG_OFFSET): Likewise.
6589         (SVE_SIG_PREGS_SIZE): Likewise.
6590         (SVE_SIG_FFR_OFFSET): Likewise.
6591         (SVE_SIG_REGS_SIZE): Likewise.
6592         (SVE_SIG_CONTEXT_SIZE): Likewise.
6593         (SVE_PT_REGS_MASK): Likewise.
6594         (SVE_PT_REGS_FPSIMD): Likewise.
6595         (SVE_PT_REGS_SVE): Likewise.
6596         (SVE_PT_VL_INHERIT): Likewise.
6597         (SVE_PT_VL_ONEXEC): Likewise.
6598         (SVE_PT_REGS_OFFSET): Likewise.
6599         (SVE_PT_FPSIMD_OFFSET): Likewise.
6600         (SVE_PT_FPSIMD_SIZE): Likewise.
6601         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6602         (SVE_PT_SVE_PREG_SIZE): Likewise.
6603         (SVE_PT_SVE_FFR_SIZE): Likewise.
6604         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6605         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6606         (__SVE_SIG_TO_PT): Likewise.
6607         (SVE_PT_SVE_OFFSET): Likewise.
6608         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6609         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6610         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6611         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6612         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6613         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6614         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6615         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6616         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6617         (SVE_PT_SVE_SIZE): Likewise.
6618         (SVE_PT_SIZE): Likewise.
6619         (HAS_SVE_STATE): New define.
6620
6621 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6622
6623         * nat/aarch64-sve-linux-sigcontext.h: New file.
6624         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6625         new files.
6626         (SVE_VQ_MIN): Likewise.
6627         (SVE_VQ_MAX): Likewise.
6628         (SVE_VL_MIN): Likewise.
6629         (SVE_VL_MAX): Likewise.
6630         (SVE_NUM_ZREGS): Likewise.
6631         (SVE_NUM_PREGS): Likewise.
6632         (sve_vl_valid): Likewise.
6633         (struct user_sve_header): Likewise.
6634
6635 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6636             Richard Bunt <Richard.Bunt@arm.com>
6637
6638         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6639         was requested by GDB.
6640
6641 2018-06-15  Tom de Vries  <tdevries@suse.de>
6642
6643         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6644
6645 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6646
6647         * gnulib/update-gnulib.sh: Print expected versions of
6648         autoconf/aclocal.
6649
6650 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6651
6652         * arch-utils.c (default_type_align): Use type_length_units.
6653         * gdbtypes.c (type_align): Use type_length_units.
6654
6655 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6656
6657         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6658         of 'define' command.
6659
6660 2018-06-14  Tom de Vries  <tdevries@suse.de>
6661
6662         PR cli/22573
6663         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6664         get_no_prettyformat_print_options.
6665
6666 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6667
6668         * sparc-nat.h: Include target.h.
6669         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6670         <fetch_registers>: Remove this argument in function call.
6671         <store_registers>: Remove this argument in function call, remove
6672         extra semicolon.
6673         <low_forget_process>: Call sparc64_forget_process instead of
6674         sparc_forget_process.
6675
6676 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6677
6678         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6679         (procfs_target::make_corefile_notes): Adjust to new
6680         target_read_alloc return type.
6681
6682 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6683             Stephen Roberts  <stephen.roberts@arm.com>
6684
6685         PR gdb/22882
6686         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6687         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6688         Move should_notify_stop local into more inner scope.
6689
6690 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6691             Stephen Roberts  <stephen.roberts@arm.com>
6692
6693         PR gdb/22882
6694         * infrun.c (resume_1): Add call to mark_async_event_handler.
6695
6696 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6697
6698         * infrun.c (do_target_wait): Change old version of $pc printed.
6699
6700 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6701
6702         * dwarf2read.c (read_index_from_section): Rename to...
6703         (read_gdb_index_from_section): ... this, update all callers.
6704         (dwarf2_read_index): Rename to...
6705         (dwarf2_read_gdb_index): ... this, update all callers.
6706
6707 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6708
6709         * gdb/hppa-linux-nat.c
6710         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6711         hppa_linux_nat_target::fetch_registers.
6712
6713 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6714
6715         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6716         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6717         (AARCH64_DWARF_SVE_FFR): Likewise.
6718         (AARCH64_DWARF_SVE_P0): Likewise.
6719         (AARCH64_DWARF_SVE_Z0): Likewise.
6720
6721 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6722
6723         * common/common-regcache.h (raw_compare): New function.
6724         * regcache.c (regcache::raw_compare): Likewise.
6725         * regcache.h (regcache::raw_compare): New declaration.
6726
6727 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6728
6729         * common/common-regcache.h (reg_buffer_common): New structure.
6730         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6731         (reg_buffer::raw_supply): Likewise.
6732         (reg_buffer::raw_supply_integer): Likewise.
6733         (reg_buffer::raw_supply_zeroed): Likewise.
6734         (reg_buffer::raw_collect): Likewise.
6735         (reg_buffer::raw_collect_integer): Likewise.
6736         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6737         (reg_buffer::raw_supply): Likewise.
6738         (reg_buffer::raw_supply_integer): Likewise.
6739         (reg_buffer::raw_supply_zeroed): Likewise.
6740         (reg_buffer::raw_collect): Likewise.
6741         (reg_buffer::raw_collect_integer): Likewise.
6742
6743 2018-06-10  Tom Tromey  <tom@tromey.com>
6744
6745         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6746         (class remote_state) <stop_reply_queue>: Now std::vector.
6747         (remote_state::~remote_state)
6748         (remote_target::stop_reply_queue_length): Update.
6749         (struct queue_iter_param, remove_child_of_pending_fork)
6750         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6751         (check_pending_event_prevents_wildcard_vcont_callback)
6752         (remove_stop_reply_for_inferior)
6753         (remove_stop_reply_of_remote_state)
6754         (remote_notif_remove_once_on_match)
6755         (stop_reply_match_ptid_and_ws)
6756         (remote_kill_child_of_pending_fork): Remove.
6757         (remote_target::remove_new_fork_children)
6758         (remote_target::check_pending_events_prevent_wildcard_vcont)
6759         (remote_target::discard_pending_stop_replies)
6760         (remote_target::discard_pending_stop_replies_in_queue)
6761         (remote_target::remote_notif_remove_queued_reply)
6762         (remote_target::queued_stop_reply)
6763         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6764         (remote_target::wait, remote_target::kill_new_fork_children)
6765         (remote_target::async): Update.
6766
6767 2018-06-10  Tom Tromey  <tom@tromey.com>
6768
6769         * record-full.c (record_full_arch_list_cleanups): Remove.
6770         (record_full_message): Use try/catch.
6771         (record_full_wait_cleanups): Remove.
6772         (record_full_wait_1): Use try/catch.
6773         (record_full_restore): Likewise.
6774
6775 2018-06-10  Tom Tromey  <tom@tromey.com>
6776
6777         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6778         declare VEC.  Add constructor.
6779         <in_target_beneath>: Now bool.
6780         (record_full_breakpoints): Now a std::vector, static.
6781         (record_full_sync_record_breakpoints)
6782         (record_full_init_record_breakpoints)
6783         (record_full_target::insert_breakpoint)
6784         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6785
6786 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6787
6788         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6789         * serial.c (serial_interface_lookup): Remove struct keyword.
6790
6791 2018-06-10  Tom Tromey  <tom@tromey.com>
6792
6793         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6794         method.
6795         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6796         a method.
6797         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6798         method.
6799         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6800         "beneath" as a method.
6801         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6802         Use "beneath" as a method.
6803
6804 2018-06-10  Tom Tromey  <tom@tromey.com>
6805
6806         * tracefile.c (struct trace_file_writer_deleter): New.
6807         <operator()>: Rename from trace_file_writer_xfree.
6808         (trace_file_writer_up): New typedef.
6809         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6810
6811 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6812
6813         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6814         <m_registers, m_register_status>: Change type to
6815         std::unique_ptr.
6816         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6817         XCNEWVEC.
6818
6819 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6820
6821         * common/common-regcache.h (enum register_status): Add
6822         underlying type "signed char".
6823         * regcache.h (reg_buffer) <m_register_status>: Change type to
6824         register_status *.
6825         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6826         register_status instead of signed char.
6827         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6828         (reg_buffer::get_register_status): Remove cast.
6829         (readable_regcache::raw_read): Remove cast.
6830         (readable_regcache::cooked_read): Remove cast.
6831
6832 2018-06-09  Tom Tromey  <tom@tromey.com>
6833
6834         * source.c (reverse_search_command, forward_search_command): Use
6835         scoped_fd.
6836
6837 2018-06-09  Tom Tromey  <tom@tromey.com>
6838
6839         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6840         (serial_ops_list): Now static, std::vector.
6841         (serial_interface_lookup, serial_add_interface): Update.
6842
6843 2018-06-09  Tom Tromey  <tom@tromey.com>
6844
6845         * dwarf2read.c (process_cu_includes): Update.
6846         (process_full_comp_unit): Update.
6847         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6848         std::vector.
6849
6850 2018-06-08  Paul Koning  <paul_koning@dell.com>
6851
6852         PR gdb/23252
6853
6854         * python/python.c (do_start_initialization):
6855         Avoid call to internal Python API.
6856         (init__gdb_module): New function.
6857
6858 2018-06-08  Gary Benson <gbenson@redhat.com>
6859
6860         * linux-thread-db.c (valprint.h): New include.
6861         (struct check_thread_db_info): New structure.
6862         (check_thread_db_on_load, tdb_testinfo): New static globals.
6863         (check_thread_db, check_thread_db_callback): New functions.
6864         (try_thread_db_load_1): Run integrity checks if requested.
6865         (maintenance_check_libthread_db): New function.
6866         (_initialize_thread_db): Register "maint check libthread-db"
6867         and "maint set/show check-libthread-db".
6868         * NEWS: Mention the above new commands.
6869
6870 2018-06-08  Tom Tromey  <tom@tromey.com>
6871
6872         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6873         now a method.
6874
6875 2018-06-08  Tom Tromey  <tom@tromey.com>
6876
6877         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6878
6879 2018-06-08  Tom Tromey  <tom@tromey.com>
6880
6881         * common/btrace-common.h (struct btrace_data): Add constructor,
6882         destructor, move assignment operator.
6883         <empty, clear, fini>: New methods.
6884         <format>: Initialize.
6885         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6886         (btrace_data_empty): Don't declare.
6887         * common/btrace-common.c (btrace_data_init): Remove.
6888         (btrace_data::fini): Rename from btrace_data_fini.
6889         (btrace_data::empty): Rename from btrace_data_empty.
6890         (btrace_data::clear): Rename from btrace_data_clear.  Return
6891         bool.
6892         * btrace.h (make_cleanup_btrace_data): Don't declare.
6893         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6894         (parse_xml_btrace): Update.
6895         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6896         (maint_btrace_clear_packet_history_cmd): Update.
6897
6898 2018-06-07  Pedro Alves  <palves@redhat.com>
6899
6900         * target.h (target_ops) <beneath>: Now a method.  All references
6901         updated.
6902         (class target_stack): New.
6903         * target.c (g_target_stack): New.
6904         (g_current_top_target): Delete.
6905         (current_top_target): Get the top target out of g_target_stack.
6906         (target_stack::push, target_stack::unpush): New.
6907         (push_target, unpush_target): Reimplement.
6908         (target_is_pushed): Reimplement in terms of g_target_stack.
6909         (target_ops::beneath, target_stack::find_beneath): New.
6910
6911 2018-06-07  Pedro Alves  <palves@redhat.com>
6912
6913         * target.h (find_target_beneath): Delete declaration.
6914         * target.c (find_target_beneath): Delete definition.
6915         * aix-thread.c: All callers of find_target_beneath adjusted to
6916         call target_ops::beneath instead.
6917         * bsd-uthread.c: Likewise.
6918         * linux-thread-db.c: Likewise.
6919         * ravenscar-thread.c: Likewise.
6920         * sol-thread.c: Likewise.
6921         * spu-multiarch.c: Likewise.
6922
6923 2018-06-07  Pedro Alves  <palves@redhat.com>
6924
6925         * target.h (target_ops) <beneath>: Now a method.  All references
6926         updated.
6927         (target_ops) <m_beneath>: New.
6928         * target.c (target_ops::beneath): New.
6929         * corelow.c: Adjust all references to target_ops::beneath.
6930         * linux-thread-db.c: Likewise.
6931         * make-target-delegates: Likewise.
6932         * record-btrace.c: Likewise.
6933         * record-full.c: Likewise.
6934         * remote.c: Likewise.
6935         * target.c: Likewise.
6936         * target-delegates.c: Regenerate.
6937
6938 2018-06-07  Pedro Alves  <palves@redhat.com>
6939
6940         * target.h (target_stack): Delete.
6941         (current_top_target): Declare function.
6942         * target.c (target_stack): Delete.
6943         (g_current_top_target): New.
6944         (current_top_target): New function.
6945         * auxv.c: Use current_top_target instead of target_stack
6946         throughout.
6947         * avr-tdep.c: Likewise.
6948         * breakpoint.c: Likewise.
6949         * corefile.c: Likewise.
6950         * elfread.c: Likewise.
6951         * eval.c: Likewise.
6952         * exceptions.c: Likewise.
6953         * frame.c: Likewise.
6954         * gdbarch-selftests.c: Likewise.
6955         * gnu-v3-abi.c: Likewise.
6956         * ia64-tdep.c: Likewise.
6957         * ia64-vms-tdep.c: Likewise.
6958         * infcall.c: Likewise.
6959         * infcmd.c: Likewise.
6960         * infrun.c: Likewise.
6961         * linespec.c: Likewise.
6962         * linux-tdep.c: Likewise.
6963         * minsyms.c: Likewise.
6964         * ppc-linux-nat.c: Likewise.
6965         * ppc-linux-tdep.c: Likewise.
6966         * procfs.c: Likewise.
6967         * regcache.c: Likewise.
6968         * remote.c: Likewise.
6969         * rs6000-tdep.c: Likewise.
6970         * s390-linux-nat.c: Likewise.
6971         * s390-tdep.c: Likewise.
6972         * solib-aix.c: Likewise.
6973         * solib-darwin.c: Likewise.
6974         * solib-dsbt.c: Likewise.
6975         * solib-spu.c: Likewise.
6976         * solib-svr4.c: Likewise.
6977         * solib-target.c: Likewise.
6978         * sparc-tdep.c: Likewise.
6979         * sparc64-tdep.c: Likewise.
6980         * spu-tdep.c: Likewise.
6981         * symfile.c: Likewise.
6982         * symtab.c: Likewise.
6983         * target-descriptions.c: Likewise.
6984         * target-memory.c: Likewise.
6985         * target.c: Likewise.
6986         * target.h: Likewise.
6987         * tracefile-tfile.c: Likewise.
6988         * tracepoint.c: Likewise.
6989         * valops.c: Likewise.
6990         * valprint.c: Likewise.
6991         * value.c: Likewise.
6992         * windows-tdep.c: Likewise.
6993         * mi/mi-main.c: Likewise.
6994
6995 2018-06-07  Tom Tromey  <tom@tromey.com>
6996
6997         * valprint.h (build_address_symbolic): Declare.
6998         * printcmd.c (print_address_symbolic): Update.
6999         (build_address_symbolic): Change "name" and "filename" to
7000         std::string.
7001         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7002         Update.
7003         * defs.h (build_address_symbolic): Remove declaration.
7004
7005 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7006
7007         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7008         (aarch64_vnv_type): Add function.
7009         (aarch64_pseudo_register_name): Add V regs for SVE.
7010         (aarch64_pseudo_register_type): Likewise.
7011         (aarch64_pseudo_register_reggroup_p): Likewise.
7012         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7013         (aarch64_pseudo_read_value): Add V regs for SVE.
7014         (aarch64_pseudo_write_2): Use V0 offset for SVE
7015         (aarch64_pseudo_write): Add V regs for SVE.
7016         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7017
7018 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7019
7020         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7021         (sve_vl_from_vq): Likewise.
7022
7023 2018-06-05  Tom Tromey  <tom@tromey.com>
7024
7025         * cli/cli-cmds.c (show_version): Update.
7026         * top.c (print_gdb_version): Add "interactive" parameter.
7027         Update.
7028         * main.c (captured_main_1): Update.
7029         * top.h (print_gdb_version): Add "interactive" parameter and a
7030         comment.
7031
7032 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7033
7034         * common/enum-flags.h: Add trailing semicolon to example in
7035         comment.
7036
7037 2018-06-05  Tom Tromey  <tom@tromey.com>
7038
7039         PR cli/12326:
7040         * NEWS: Add entry about pager.
7041         * utils.c (pagination_disabled_for_command): New global.
7042         (prompt_for_continue): Allow "c" response to prompt.
7043         (reinitialize_more_filter): Clear
7044         pagination_disabled_for_command.
7045         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7046
7047 2018-06-04  Tom Tromey  <tom@tromey.com>
7048
7049         * ada-lang.h (ada_lookup_symbol_list): Update.
7050         * ada-lang.c (resolve_subexp): Update.
7051         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7052         parameter.
7053         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7054         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7055         results parameter to std::vector.
7056         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7057         Update.
7058         * ada-exp.y (block_lookup): Update.
7059         (select_possible_type_sym): Change type of syms.  Remove nsyms
7060         parameter.
7061         (write_var_or_type, write_name_assoc): Update.
7062
7063 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7064
7065         * windows-nat.c (windows_nat_target::xfer_partial): Return
7066         TARGET_XFER_E_IO if we need to delegate to the target beneath
7067         but BENEATH is NULL.
7068
7069 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7070
7071         * Makefile.in (config.status): Add configure.nat as a
7072         dependency.
7073
7074 2018-06-04  Tom Tromey  <tom@tromey.com>
7075
7076         * cp-name-parser.y (cpname_state): Add method declarations.
7077         (HANDLE_QUAL): Update.
7078         (cpname_state::d_grab, cpname_state::fill_comp)
7079         (cpname_state::make_operator, cpname_state::make_dtor)
7080         (cpname_state::make_builtin_type, cpname_state::make_name)
7081         (cpname_state::d_qualify, cpname_state::d_int_type)
7082         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7083         (%union): Move earlier.
7084
7085 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7086
7087         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7088
7089 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7090
7091         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7092         (aarch64_pseudo_write_1): Likewise.
7093         (aarch64_pseudo_read_value): Use helper.
7094         (aarch64_pseudo_write): Likewise.
7095
7096 2018-06-04  Pedro Alves  <palves@redhat.com>
7097
7098         * darwin-nat.c (darwin_ops): Delete.
7099         (darwin_attach_pid): Use get_native_target.
7100
7101 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7102
7103         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7104         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7105
7106 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7107
7108         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7109         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7110         (aarch64_gdbarch_init): Check for SVE.
7111         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7112
7113 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7114
7115         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7116         * aarch64-tdep.h (aarch64_read_description): Likewise.
7117         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7118         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7119         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7120         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7121         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7122
7123 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7124
7125         * value.c (value_fetch_lazy_bitfield): New.
7126         (value_fetch_lazy_memory): New.
7127         (value_fetch_lazy_register): New.
7128         (value_fetch_lazy): Factor out to smaller functions.
7129
7130 2018-06-01  Tom Tromey  <tom@tromey.com>
7131
7132         * cp-name-parser.y (backslashable, represented): Now const.
7133
7134 2018-06-01  Tom Tromey  <tom@tromey.com>
7135
7136         * cp-name-parser.y: Include parser-defs.h.
7137         (parser_fprintf): Remove declaration.
7138
7139 2018-06-01  Tom Tromey  <tom@tromey.com>
7140
7141         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7142         %parse-param.
7143         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7144         (global_result): Remove globals.
7145         (struct cpname_state): New.
7146         (yyparse): Don't declare.
7147         (yylex, yyerror): Move declarations after %union.
7148         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7149         (make_name): Add state parameter.
7150         Update all callers.
7151         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7152         parameter.
7153         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7154         Update.
7155         (yylex): Add lvalp, state parameters.
7156         (yyerror): Add state parameter.
7157         (cp_demangled_name_to_comp): Update.
7158
7159 2018-06-01  Tom Tromey  <tom@tromey.com>
7160
7161         * cp-name-parser.y (parser_fprintf): Declare.
7162         (GDB_YY_REMAP_PREFIX): Define.
7163         Include yy-remap.h.  Don't redefine yy* identifiers.
7164
7165 2018-06-01  Tom Tromey  <tom@tromey.com>
7166
7167         * python/py-type.c (typy_legacy_template_argument): Update.
7168         * cp-support.h (cp_demangled_name_to_comp): Update.
7169         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7170         parameter to be a "std::string *".
7171         (main): Update.
7172
7173 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7174
7175         * ada-lex.l: Include "diagnostics.h" instead of
7176         "common/diagnostics.h".
7177         * unittests/environ-selftests.c: Likewise.
7178         * common/diagnostics.h: Moved to ../include.
7179
7180 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7181
7182         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7183         to language_mode_manual while calling breakpoint_re_set_one.
7184
7185 2018-06-01  Tom Tromey  <tom@tromey.com>
7186
7187         * valops.c (value_cast_structs, destructor_name_p): Update.
7188         * symtab.c (gdb_mangle_name): Update.
7189         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7190         Update.
7191         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7192         (pascal_object_print_value_fields, pascal_object_print_value):
7193         Update.
7194         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7195         * linespec.c (find_methods): Update.
7196         * gdbtypes.h (type_name_no_tag): Remove.
7197         (type_name_or_error): Rename from type_name_no_tag_or_error.
7198         * gdbtypes.c (type_name_no_tag): Remove.
7199         (type_name_or_error): Rename from type_name_no_tag_or_error.
7200         (lookup_struct_elt_type, check_typedef): Update.
7201         * expprint.c (print_subexp_standard): Update.
7202         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7203         * d-namespace.c (d_lookup_nested_symbol): Update.
7204         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7205         (cp_print_class_member): Update.
7206         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7207         * completer.c (add_struct_fields): Update.
7208         * c-typeprint.c (cp_type_print_derivation_info)
7209         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7210         Update.
7211         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7212         (ada_prefer_type, ada_is_exception_sym): Update.
7213
7214 2018-06-01  Tom Tromey  <tom@tromey.com>
7215
7216         * valops.c (enum_constant_from_type, value_namespace_elt)
7217         (value_maybe_namespace_elt): Update.
7218         * valarith.c (find_size_for_pointer_math): Update.
7219         * target-descriptions.c (make_gdb_type): Update.
7220         * symmisc.c (print_symbol): Update.
7221         * stabsread.c (define_symbol, read_type)
7222         (complain_about_struct_wipeout, add_undefined_type)
7223         (cleanup_undefined_types_1): Update.
7224         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7225         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7226         (rust_internal_print_type, rust_composite_type)
7227         (rust_evaluate_funcall, rust_evaluate_subexp)
7228         (rust_inclusive_range_type_p): Update.
7229         * python/py-type.c (typy_get_tag): Update.
7230         * p-typeprint.c (pascal_type_print_base): Update.
7231         * mdebugread.c (parse_symbol, parse_type): Update.
7232         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7233         Update.
7234         * guile/scm-type.c (gdbscm_type_tag): Update.
7235         * go-lang.c (sixg_string_p): Update.
7236         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7237         Update.
7238         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7239         (TYPE_TAG_NAME): Remove.
7240         * gdbtypes.c (type_name_no_tag): Simplify.
7241         (check_typedef, check_types_equal, recursive_dump_type)
7242         (copy_type_recursive, arch_composite_type): Update.
7243         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7244         in summary mode when needed.
7245         * eval.c (evaluate_funcall): Update.
7246         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7247         (process_structure_scope, read_enumeration_type)
7248         (read_namespace_type, read_module_type, determine_prefix): Update.
7249         * cp-support.c (inspect_type): Update.
7250         * coffread.c (process_coff_symbol, decode_base_type): Update.
7251         * c-varobj.c (c_is_path_expr_parent): Update.
7252         * c-typeprint.c (c_type_print_base_struct_union): Update.
7253         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7254         summary when using C language.
7255         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7256         (gen_maybe_namespace_elt): Update.
7257         * ada-lang.c (ada_type_name): Simplify.
7258         (empty_record, ada_template_to_fixed_record_type_1)
7259         (template_to_static_fixed_type)
7260         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7261
7262 2018-06-01  Tom Tromey  <tom@tromey.com>
7263
7264         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7265         c_print_type.
7266         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7267         (c_print_type): Update.
7268         (c_print_type): New overload.
7269         (c_type_print_varspec_prefix, c_type_print_args)
7270         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7271         (c_type_print_base_struct_union, c_type_print_base_1)
7272         (cp_type_print_method_args): Add "language" parameter.
7273         (c_type_print_base): Update.
7274         * c-lang.h (c_print_type): Add new overload.
7275
7276 2018-06-01  Tom Tromey  <tom@tromey.com>
7277
7278         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7279         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7280
7281 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7282
7283         * aarch64-tdep.c (aarch64_sve_register_names): New const
7284         var.
7285         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7286         (AARCH64_SVE_Z_REGS_NUM): New define.
7287         (AARCH64_SVE_P_REGS_NUM): Likewise.
7288         (AARCH64_SVE_NUM_REGS): Likewise.
7289
7290 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7291
7292         * nat/linux-ptrace.h [__alpha__]
7293         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7294         definitions.
7295
7296 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7297
7298         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7299         the endianness selected.
7300         * NEWS: Document `set endian auto' mode operation update.
7301
7302 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7303
7304         * Makefile.in: Add new header.
7305         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7306         (sve_vl_from_vg): Likewise.
7307         (sve_vq_from_vl): Likewise.
7308         (sve_vl_from_vq): Likewise.
7309         (sve_vq_from_vg): Likewise.
7310         (sve_vg_from_vq): Likewise.
7311         * configure.nat: Add new c file.
7312         * nat/aarch64-sve-linux-ptrace.c: New file.
7313         * nat/aarch64-sve-linux-ptrace.h: New file.
7314
7315 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7316
7317         * aarch64-linux-nat.c (aarch64_linux_read_description):
7318         Add parmeter zero.
7319         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7320         Likewise.
7321         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7322         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7323         (aarch64_gdbarch_init): Add parmeter zero.
7324         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7325         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7326         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7327         parmeter.
7328         * doc/gdb.texinfo: Describe SVE feature
7329         * features/aarch64-sve.c: New file.
7330
7331 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7332
7333         PR gdb/23210
7334         * gdbarch.sh (significant_addr_bit): Default to zero when
7335         not set by target architecture.
7336         * gdbarch.c: Re-generated.
7337         * utils.c (address_significant): Update.
7338
7339 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7340
7341         * stack.c (func_command): Remove trailing newline in call to error.
7342
7343 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7344
7345         * regcache.h (regcache_raw_collect): Remove, update callers to
7346         use regcache::raw_collect.
7347         * regcache.c (regcache_raw_collect): Remove.
7348
7349 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7350
7351         * regcache.h (regcache_raw_supply): Remove, update callers to
7352         use detached_regcache::raw_supply.
7353         * regcache.c (regcache_raw_supply): Remove.
7354
7355 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7356
7357         * regcache.h (regcache_cooked_write_part): Remove, update
7358         callers to use regcache::cooked_write_part.
7359         * regcache.c (regcache_cooked_write_part): Remove.
7360
7361 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7362
7363         * regcache.h (regcache_cooked_read_part): Remove, update callers
7364         to use readable_regcache::cooked_read_part.
7365         * regcache.c (regcache_cooked_read_part): Remove.
7366
7367 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7368
7369         * regcache.h (regcache_cooked_read_value): Remove, update
7370         callers to use readable_regcache::cooked_read_value.
7371         * regcache.c (regcache_cooked_read_value): Remove.
7372
7373 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7374
7375         * regcache.h (regcache_cooked_write): Remove, update callers to
7376         use regcache::cooked_write.
7377         * regcache.c (regcache_cooked_write): Remove.
7378
7379 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7380
7381         * regcache.h (regcache_invalidate): Remove, update callers to
7382         use detached_regcache::invalidate instead.
7383         * regcache.c (regcache_invalidate): Remove.
7384
7385 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7386
7387         * regcache.h (regcache_raw_write_part): Remove, update callers
7388         to use regcache::raw_write_part instead.
7389         * regcache.c (regcache_raw_write_part): Remove.
7390
7391 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7392
7393         * regcache.h (regcache_raw_read_part): Remove, update callers to
7394         use readable_regcache::raw_read_part instead.
7395         * regcache.c (regcache_raw_read_part): Remove.
7396
7397 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7398
7399         * regcache.h (regcache_cooked_read): Remove, update callers to
7400         use readable_regcache::cooked_read instead.
7401         * regcache.c (regcache_cooked_read): Remove.
7402
7403 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7404
7405         * regcache.h (regcache_raw_write): Remove, update callers to use
7406         regcache::raw_write instead.
7407         * regcache.c (regcache_raw_write): Remove.
7408
7409 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7410
7411         * regcache.h (regcache_raw_read): Remove, update callers to use
7412         readable_regcache::raw_read instead.
7413         * regcache.c (regcache_raw_read): Remove.
7414
7415 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7416
7417         * regcache.h (regcache_raw_update): Remove, update callers to
7418         use readable_regcache::raw_update instead.
7419         * regcache.c (regcache_raw_update): Remove.
7420
7421 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * regcache.h (regcache_register_status): Remove, update callers
7424         to use reg_buffer::get_register_status directly instead.
7425         * regcache.c (regcache_register_status): Remove.
7426
7427 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7428
7429         * regcache.h (regcache_get_ptid): Remove, update all callers to
7430         call regcache::ptid instead.
7431         * regcache.c (regcache_get_ptid): Remove.
7432
7433 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7434
7435         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7436
7437 2018-05-30  Pedro Alves  <palves@redhat.com>
7438
7439         * common/common-exceptions.h (exception_rethrow): Use
7440         ATTRIBUTE_NORETURN.
7441
7442 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7443
7444         * breakpoint.c (print_solib_event, check_status_catch_solib):
7445         Remove struct keyword in range-based for loops.
7446         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7447         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7448         Likewise.
7449         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7450         Likewise.
7451         * symfile.c (addr_info_make_relative): Likewise.
7452         * thread.c (value_in_thread_stack_temporaries): Likewise.
7453
7454 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7455
7456         PR gdb/16841
7457         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7458         aggregate type to get its real type before accessing it.
7459
7460 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7461
7462         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7463         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7464         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7465         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7466         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7467         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7468         * printcmd.c (info_address_command): Likewise.
7469
7470 2018-05-29  Tom Tromey  <tom@tromey.com>
7471
7472         * windows-nat.c (handle_exception): Update fall-through comment.
7473
7474 2018-05-29  Tom Tromey  <tom@tromey.com>
7475
7476         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7477         (struct program_space) <added_solibs>: Now a std::vector.
7478         * breakpoint.c (print_solib_event): Update.
7479         (check_status_catch_solib): Update.
7480         * progspace.c (clear_program_space_solib_cache): Update.
7481         * solib.c (update_solib_list): Update.
7482
7483 2018-05-29  Tom Tromey  <tom@tromey.com>
7484
7485         * python/py-type.c (typy_richcompare): Update.
7486         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7487         * gdbtypes.h (types_deeply_equal): Return bool.
7488         (types_equal): Likewise.
7489         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7490         declare VEC.
7491         (check_types_equal): Change worklist to std::vector.  Return
7492         bool.
7493         (struct type_equality_entry): Add constructor.
7494         (compare_maybe_null_strings): Return bool.
7495         (check_types_worklist): Return bool.  Change worklist to
7496         std::vector.
7497         (types_deeply_equal): Use std::vector.
7498         (types_equal): Return bool.
7499         (compare_maybe_null_strings): Simplify.
7500
7501 2018-05-29  Tom Tromey  <tom@tromey.com>
7502
7503         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7504
7505 2018-05-29  Tom Tromey  <tom@tromey.com>
7506
7507         * objc-lang.h: Don't include cp-support.h.
7508         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7509         declare VEC.
7510
7511 2018-05-27  Tom Tromey  <tom@tromey.com>
7512
7513         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7514
7515 2018-05-25  Tom Tromey  <tom@tromey.com>
7516
7517         * value.c (value::location): Initialize.
7518
7519 2018-05-25  Tom Tromey  <tom@tromey.com>
7520
7521         * dbxread.c (init_bincl_list): Remove.
7522         (bincl_list): Now a std::vector.
7523         (bincls_allocated, next_bincl): Remove.
7524         (free_bincl_list, do_free_bincl_list_cleanup)
7525         (make_cleanup_free_bincl_list): Remove.
7526         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7527         unique_xmalloc_ptr.
7528         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7529         (struct header_file_location): Add constructor.
7530         (add_bincl_to_list): Remove.
7531
7532 2018-05-25  Tom Tromey  <tom@tromey.com>
7533
7534         * tui/tui.c (tui_enable): Update.
7535         * mi/mi-interp.c (mi_interp::init): Update.
7536         * interps.h (class interp) <name>: New method.
7537         <m_name>: Rename from name.
7538         (~scoped_restore_interp): Update.
7539         * interps.c (interp::interp): Update.
7540         (interp_add, interp_set, interp_lookup_existing)
7541         (current_interp_named_p): Update.
7542
7543 2018-05-25  Tom Tromey  <tom@tromey.com>
7544
7545         * interps.c (interp_name): Remove.
7546         * mi/mi-interp.c (mi_interp::init): Update.
7547         * interps.h (interp_name): Remove.
7548         (~scoped_restore_interp): Update.
7549         * tui/tui.c (tui_enable): Update.
7550
7551 2018-05-25  Tom Tromey  <tom@tromey.com>
7552
7553         * utils.c (fputs_maybe_filtered): Update.
7554         * linespec.c (decode_line_full): Update.
7555         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7556         (mi_print_breakpoint_for_event, mi_solib_loaded)
7557         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7558         (mi_user_selected_context_changed): Update.
7559         * mi/mi-main.c (mi_execute_command): Update.
7560         * cli/cli-script.c (execute_control_command): Update.
7561         * python/python.c (execute_gdb_command): Update.
7562         * solib.c (info_sharedlibrary_command): Update.
7563         * interps.c (interp_ui_out): Remove.
7564         * interps.h (interp_ui_out): Remove.
7565
7566 2018-05-25  Tom Tromey  <tom@tromey.com>
7567
7568         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7569         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7570         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7571
7572 2018-05-25  Tom Tromey  <tom@tromey.com>
7573
7574         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7575         * interps.c (interp_exec): Use scoped_restore.
7576
7577 2018-05-25  Tom Tromey  <tom@tromey.com>
7578
7579         * remote.c (remote_target::remote_file_get): Use
7580         gdb::byte_vector.
7581         (remote_target::remote_file_put): Likewise.
7582
7583 2018-05-25  Tom Tromey  <tom@tromey.com>
7584
7585         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7586         a std::string.
7587         (get_pe_section_index, add_pe_exported_sym): Update.
7588         (read_pe_exported_syms): Use gdb::def_vector.
7589
7590 2018-05-25  Tom Tromey  <tom@tromey.com>
7591
7592         * frame.c (remove_prev_frame): Remove.
7593         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7594
7595 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7596
7597         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7598         Remove prototypes.
7599         * mips-linux-nat.c (supply_fpregset): Always call
7600         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7601         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7602         `mips_fill_fpregset'.
7603         * mips-linux-tdep.c (mips_supply_fpregset)
7604         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7605         (mips_fill_fpregset_wrapper): Remove functions.
7606         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7607         (mips_linux_fpregset): Remove variable.
7608         (mips_linux_iterate_over_regset_sections): Use
7609         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7610         (mips_linux_o32_sigframe_init): Remove comment.
7611
7612 2018-05-25  Pedro Alves  <palves@redhat.com>
7613
7614         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7615         (struct readahead_cache, struct packet_reg, struct
7616         remote_arch_state, class remote_state): Move higher up in the
7617         file.
7618         (remote_target::m_remote_state): Now an object instead of a pointer.
7619         (remote_target::get_remote_state): Adjust.
7620
7621 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7622
7623         * stack.c (select_and_print_frame): Delete.
7624         (struct function_bounds): Move struct within function.
7625         (func_command): Most content moved into new function
7626         find_frame_for_function, use new function, print result, add
7627         function comment.
7628         (find_frame_for_function): New function, now returns a result.
7629
7630 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7631
7632         * stack.c (iterate_over_block_arg_vars): Fix comment.
7633         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7634
7635 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7636
7637         PR gdb/23203
7638         * frame.c
7639         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7640         Define.
7641         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7642         Define.
7643         * frame.h (class scoped_restore_selected_frame): New class.
7644         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7645         of any exception, use scoped_restore_selected_frame to restore the
7646         frame instead.
7647
7648 2018-05-24  Pedro Alves  <palves@redhat.com>
7649
7650         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7651         override.
7652
7653 2018-05-23  Tom Tromey  <tom@tromey.com>
7654
7655         * complaints.c (struct complaints): Remove.
7656         (symfile_complaint_book): Remove.
7657         (series): New global.
7658         (complaint_internal): Update.
7659         (clear_complaints): Update.
7660
7661 2018-05-23  Tom Tromey  <tom@tromey.com>
7662
7663         * complaints.c (counters): New global.
7664         (struct complain): Remove.
7665         (struct complaints) <root>: Remove.
7666         (complaint_sentinel): Remove.
7667         (symfile_complaint_book): Update.
7668         (find_complaint) Remove.
7669         (complaint_internal, clear_complaints): Update.
7670
7671 2018-05-23  Tom Tromey  <tom@tromey.com>
7672
7673         * complaints.c (struct complain) <file, line>: Remove.
7674         (find_complaint): Remove file, line parameters.
7675         (complaint_internal): Update.
7676
7677 2018-05-23  Tom Tromey  <tom@tromey.com>
7678
7679         * complaints.c (vcomplaint): Remove.
7680         (complaint_internal) Merge in contents of vcomplaint.
7681
7682 2018-05-23  Tom Tromey  <tom@tromey.com>
7683
7684         * complaints.c (struct complaints) <explanation>: Remove.
7685         (symfile_explanations): Remove.
7686         (symfile_complaint_book): Update.
7687         (vcomplaint): Update.
7688         (struct explanation): Remove.
7689
7690 2018-05-23  Tom Tromey  <tom@tromey.com>
7691
7692         * complaints.c (symfile_complaints): Remove.
7693         (complaint_internal): Remove "complaints" parameter.
7694         (clear_complaints, vcomplaint): Remove "c" parameter.
7695         (get_complaints): Remove.
7696         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7697         (dwarf2_debug_line_missing_file_complaint)
7698         (dwarf2_debug_line_missing_end_sequence_complaint)
7699         (dwarf2_complex_location_expr_complaint)
7700         (dwarf2_const_value_length_mismatch_complaint)
7701         (dwarf2_section_buffer_overflow_complaint)
7702         (dwarf2_macro_malformed_definition_complaint)
7703         (dwarf2_invalid_attrib_class_complaint)
7704         (create_addrmap_from_index, dw2_symtab_iter_next)
7705         (dw2_expand_marked_cus)
7706         (dw2_debug_names_iterator::find_vec_in_debug_names)
7707         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7708         (create_debug_type_hash_table, init_cutu_and_read_dies)
7709         (partial_die_parent_scope, add_partial_enumeration)
7710         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7711         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7712         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7713         (create_cus_hash_table, create_dwp_hash_table)
7714         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7715         (dwarf2_rnglists_process, dwarf2_ranges_process)
7716         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7717         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7718         (handle_struct_member_die, process_structure_scope)
7719         (read_array_type, read_common_block, read_module_type)
7720         (read_tag_pointer_type, read_typedef, read_base_type)
7721         (read_subrange_type, load_partial_dies, partial_die_info::read)
7722         (partial_die_info::read, partial_die_info::read)
7723         (partial_die_info::read, read_checked_initial_length_and_offset)
7724         (dwarf2_string_attr, read_formatted_entries)
7725         (dwarf_decode_line_header)
7726         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7727         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7728         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7729         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7730         (get_signatured_type, get_DW_AT_signature_type)
7731         (decode_locdesc, file_file_name, consume_improper_spaces)
7732         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7733         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7734         (dwarf2_symbol_mark_computed, set_die_type)
7735         (read_attribute_value): Update.
7736         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7737         Update.
7738         * dbxread.c (unknown_symtype_complaint)
7739         (lbrac_mismatch_complaint, repeated_header_complaint)
7740         (set_namestring, function_outside_compilation_unit_complaint)
7741         (read_dbx_symtab, process_one_symbol): Update.
7742         * gdbtypes.c (stub_noname_complaint): Update.
7743         * windows-nat.c (handle_unload_dll): Update.
7744         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7745         (decode_base_type): Update.
7746         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7747         (eb_complaint, record_include_begin, record_include_end)
7748         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7749         (process_xcoff_symbol, read_symbol)
7750         (function_outside_compilation_unit_complaint)
7751         (scan_xcoff_symtab): Update.
7752         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7753         * buildsym.c (finish_block_internal, make_blockvector)
7754         (end_symtab_get_static_block, augment_type_symtab): Update.
7755         * dtrace-probe.c (dtrace_process_dof)
7756         (dtrace_static_probe_ops::get_probes): Update.
7757         * complaints.h (struct complaint): Don't declare.
7758         (symfile_complaints): Remove.
7759         (complaint_internal): Remove "complaints" parameter.
7760         (complaint): Likewise.
7761         (clear_complaints): Likewise.
7762         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7763         (reread_symbols): Update.
7764         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7765         (dwarf2_frame_cache, decode_frame_entry): Update.
7766         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7767         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7768         (info_selectors_command): Update.
7769         * macrotab.c (macro_include, check_for_redefinition)
7770         (macro_undef): Update.
7771         * objfiles.c (filter_overlapping_sections): Update.
7772         * stabsread.c (invalid_cpp_abbrev_complaint)
7773         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7774         (define_symbol, error_type, read_type, rs6000_builtin_type)
7775         (stabs_method_name_from_physname, read_member_functions)
7776         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7777         (attach_fields_to_type, complain_about_struct_wipeout)
7778         (read_range_type, read_args, common_block_start)
7779         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7780         Update.
7781         * mdebugread.c (index_complaint, unknown_ext_complaint)
7782         (basic_type_complaint, bad_tag_guess_complaint)
7783         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7784         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7785         (parse_procedure, parse_lines)
7786         (function_outside_compilation_unit_complaint)
7787         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7788         (bad_tag_guess_complaint, reg_value_complaint): Update.
7789         * cp-support.c (demangled_name_complaint): Update.
7790         * macroscope.c (sal_macro_scope): Update.
7791         * dwarf-index-write.c (class debug_names): Update.
7792
7793 2018-05-23  Tom Tromey  <tom@tromey.com>
7794
7795         * complaints.c (clear_complaints): Remove "noisy" parameter.
7796         * complaints.h (clear_complaints): Update.
7797         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7798         (reread_symbols): Update.
7799
7800 2018-05-23  Tom Tromey  <tom@tromey.com>
7801
7802         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7803         SUBSEQUENT_MESSAGE.
7804         (vcomplaint, clear_complaints): Update.
7805         (symfile_explanations): Remove some messages.
7806
7807 2018-05-23  Tom Tromey  <tom@tromey.com>
7808
7809         * complaints.c (internal_complaint): Remove.
7810         * complaints.h (internal_complaint): Remove.
7811
7812 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7813
7814         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7815
7816 2018-05-22  Pedro Alves  <palves@redhat.com>
7817
7818         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7819         (remote_fileio_badfd, remote_fileio_return_errno)
7820         (remote_fileio_return_success, remote_fileio_func_open)
7821         (remote_fileio_func_open, remote_fileio_func_close)
7822         (remote_fileio_func_read, remote_fileio_func_write)
7823         (remote_fileio_func_lseek, remote_fileio_func_rename)
7824         (remote_fileio_func_unlink, remote_fileio_func_stat)
7825         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7826         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7827         remote_target parameter.
7828         (remote_fio_func_map) <func>: Add remote_target parameter.
7829         (do_remote_fileio_request, remote_fileio_request):
7830         * remote-fileio.h (remote_fileio_request):
7831         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7832         remote_target parameter.
7833         (remote_notif_process, handle_notification): Adjust to pass down
7834         the remote.
7835         (remote_notif_state_allocate): Add remote_target parameter.  Save
7836         it.
7837         * remote-notif.h (struct remote_target): Forward declare.
7838         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7839         remote_target parameter.
7840         (struct remote_notif_state) <remote>: New field.
7841         (remote_notif_ack, remote_notif_parse): Add remote_target
7842         parameter.
7843         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7844         remote_target parameter.
7845         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7846         (threads_listing_context, rmt_thread_action, protocol_feature)
7847         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7848         (packet_result, struct threads_listing_context, remote_state):
7849         Move definitions and declarations higher up.
7850         (remote_target) <~remote_target>: Declare.
7851         (remote_download_command_source, remote_file_put, remote_file_get)
7852         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7853         (remote_hostio_pread_vFile, remote_hostio_send_command)
7854         (remote_hostio_set_filesystem, remote_hostio_open)
7855         (remote_hostio_close, remote_hostio_unlink, remote_state)
7856         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7857         (get_memory_write_packet_size, get_memory_read_packet_size)
7858         (append_pending_thread_resumptions, remote_detach_1)
7859         (append_resumption, remote_resume_with_vcont)
7860         (add_current_inferior_and_thread, wait_ns, wait_as)
7861         (process_stop_reply, remote_notice_new_inferior)
7862         (process_initial_stop_replies, remote_add_thread)
7863         (btrace_sync_conf, remote_btrace_maybe_reopen)
7864         (remove_new_fork_children, kill_new_fork_children)
7865         (discard_pending_stop_replies, stop_reply_queue_length)
7866         (check_pending_events_prevent_wildcard_vcont)
7867         (discard_pending_stop_replies_in_queue, stop_reply)
7868         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7869         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7870         (remote_interrupt_as, remote_interrupt_ns)
7871         (remote_get_noisy_reply, remote_query_attached)
7872         (remote_add_inferior, remote_current_thread, get_current_thread)
7873         (set_thread, set_general_thread, set_continue_thread)
7874         (set_general_process, write_ptid)
7875         (remote_unpack_thread_info_response, remote_get_threadinfo)
7876         (parse_threadlist_response, remote_get_threadlist)
7877         (remote_threadlist_iterator, remote_get_threads_with_ql)
7878         (remote_get_threads_with_qxfer)
7879         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7880         (get_offsets, remote_check_symbols, remote_supported_packet)
7881         (remote_query_supported, remote_packet_size)
7882         (remote_serial_quit_handler, remote_detach_pid)
7883         (remote_vcont_probe, remote_resume_with_hc)
7884         (send_interrupt_sequence, interrupt_query)
7885         (remote_notif_get_pending_events, fetch_register_using_p)
7886         (send_g_packet, process_g_packet, fetch_registers_using_g)
7887         (store_register_using_P, store_registers_using_G)
7888         (set_remote_traceframe, check_binary_download)
7889         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7890         (remote_xfer_live_readonly_partial, remote_read_bytes)
7891         (remote_send_printf, remote_flash_write, readchar)
7892         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7893         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7894         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7895         (extended_remote_disable_randomization, extended_remote_run)
7896         (send_environment_packet, extended_remote_environment_support)
7897         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7898         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7899         (packet_command): Now methods of ...
7900         (remote_target): ... this class.
7901         (m_remote_state) <remote_target>: New field.
7902         (struct remote_state) <stop_reply_queue,
7903         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7904         fields.
7905         (remote_state::remote_state): Allocate stop_reply_queue.
7906         (remote_state): Delete global.
7907         (get_remote_state_raw): Delete.
7908         (remote_target::get_remote_state): Allocate m_remote_state on
7909         demand.
7910         (get_current_remote_target): New.
7911         (remote_ops, extended_remote_ops): Delete.
7912         (wait_forever_enabled_p, remote_async_inferior_event_token):
7913         Delete, moved to struct remote_state.
7914         (remote_target::close): Delete self.  Destruction bits split to
7915         ...
7916         (remote_target::~remote_target): ... this.
7917         (show_memory_packet_size): Adjust to use
7918         get_current_remote_target.
7919         (struct protocol_feature) <func>: Add remote_target parameter.
7920         All callers adjusted.
7921         (curr_quit_handler_target): New.
7922         (remote_serial_quit_handler): Reimplement.
7923         (remote_target::open_1): Adjust to use get_current_remote_target.
7924         Heap-allocate remote_target/extended_remote_target instances.
7925         (vcont_builder::vcont_builder): Add remote_target parameter, and
7926         save it in m_remote.  All callers adjusted.
7927         (vcont_builder::m_remote): New field.
7928         (vcont_builder::restart, vcont_builder::flush)
7929         (vcont_builder::push_action): Use it.
7930         (remote_target::commit_resume): Use it.
7931         (struct queue_iter_param) <remote>: New field.
7932         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7933         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7934         (check_pending_event_prevents_wildcard_vcont_callback)
7935         (remote_target::check_pending_events_prevent_wildcard_vcont)
7936         (remote_target::discard_pending_stop_replies)
7937         (remote_target::discard_pending_stop_replies_in_queue)
7938         (remote_target::remote_notif_remove_queued_reply): Fill in
7939         'remote' field.
7940         (remote_notif_get_pending_events): New.
7941         (remote_target::readchar, remote_target::remote_serial_write):
7942         Save/restore curr_quit_handler_target.
7943         (putpkt): New.
7944         (kill_new_fork_children): Fill in 'remote' field.
7945         (packet_command): Use get_current_remote_target, defer to
7946         remote_target method of same name.
7947         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7948         parameter, and save it in m_remote.  All callers adjusted.
7949         (scoped_remote_fd::release): Use m_remote.
7950         (scoped_remote_fd::m_remote): New field.
7951         (remote_file_put, remote_file_get, remote_file_delete): Use
7952         get_current_remote_target, defer to remote_target method of same
7953         name.
7954         (remote_btrace_reset): Add remote_state paremeter.  Update all
7955         callers.
7956         (remote_async_inferior_event_handler). Pass down 'data'.
7957         (remote_new_objfile): Use get_current_remote_target.
7958         (remote_target::vcont_r_supported): New.
7959         (set_range_stepping): Use get_current_remote_target and
7960         remote_target::vcont_r_supported.
7961         (_initialize_remote): Don't allocate 'remote_state' and
7962         'stop_reply_queue' globals.
7963         * remote.h (struct remote_target): Forward declare.
7964         (getpkt, putpkt, remote_notif_get_pending_events): Add
7965         'remote_target' parameter.
7966
7967 2018-05-22  Pedro Alves  <palves@redhat.com>
7968
7969         * remote.c (vcont_builder): Now a class.  Make all data members
7970         private.
7971         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7972         Declare methods.
7973         (vcont_builder_restart): Rename to ...
7974         (vcont_builder::restart): ... this.
7975         (vcont_builder_flush): Rename to ...
7976         (vcont_builder::flush): ... this.
7977         (vcont_builder_push_action): Rename to ...
7978         (vcont_builder::push_action): ... this.
7979         (remote_target::commit_resume): Adjust.
7980
7981 2018-05-22  Pedro Alves  <palves@redhat.com>
7982
7983         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7984         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7985         (get_fixed_memory_packet_size): New.
7986         (get_memory_packet_size): Use it.
7987         (set_memory_packet_size): Don't override the config size with
7988         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7989         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7990         Don't refer to get_memory_packet_size if not connected to a remote
7991         target.  Show "(default)" if configured size is 0.
7992
7993 2018-05-22  Pedro Alves  <palves@redhat.com>
7994
7995         * remote.c (remote_target::mourn_inferior): Move
7996         discard_pending_stop_replies call here from ...
7997         (_initialize_remote): ... here.
7998
7999 2018-05-22  Pedro Alves  <palves@redhat.com>
8000
8001         * remote.c (compare_section_command): Remove set_general_process
8002         call.
8003
8004 2018-05-22  Pedro Alves  <palves@redhat.com>
8005
8006         * remote.c (struct packet_reg, struct remote_arch_state):
8007         Move higher up in the file.
8008         (remote_state) <m_arch_states>: Store remote_arch_state values
8009         instead of remote_arch_state pointers.
8010         (remote_state::get_remote_arch_state): Adjust.
8011
8012 2018-05-22  Pedro Alves  <palves@redhat.com>
8013
8014         * remote.c: Include <unordered_map>.
8015         (remote_state): Now a class.
8016         (remote_state) <get_remote_arch_state>: Declare method.
8017         <get_remote_arch_state>: New field.
8018         (remote_arch_state) <remote_arch_state>: Declare ctor.
8019         <regs>: Now a unique_ptr.
8020         (remote_gdbarch_data_handle): Delete.
8021         (get_remote_arch_state): Delete.
8022         (remote_state::get_remote_arch_state): New.
8023         (get_remote_state): Adjust to call remote_state's
8024         get_remote_arch_state method.
8025         (init_remote_state): Delete, bits factored out to ...
8026         (remote_arch_state::remote_arch_state): ... this new method.
8027         (get_remote_packet_size, get_memory_packet_size)
8028         (process_g_packet, remote_target::fetch_registers)
8029         (remote_target::prepare_to_store, store_registers_using_G)
8030         (remote_target::store_registers, remote_target::get_trace_status):
8031         Adjust to call remote_state's method.
8032         (_initialize_remote): Remove reference to
8033         remote_gdbarch_data_handle.
8034
8035 2018-05-22  Pedro Alves  <palves@redhat.com>
8036
8037         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8038         pread>: New method declarations.
8039         (remote_target::open_1): Adjust.
8040         (readahead_cache_invalidate): Rename to ...
8041         (readahead_cache::invalidate): ... this, and adjust to be a class
8042         method.
8043         (readahead_cache_invalidate_fd): Rename to ...
8044         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8045         class method.
8046         (remote_hostio_pwrite): Adjust.
8047         (remote_hostio_pread_from_cache): Rename to ...
8048         (readahead_cache::pread): ... this, and adjust to be a class
8049         method.
8050         (remote_hostio_close): Adjust.
8051
8052 2018-05-22  Pedro Alves  <palves@redhat.com>
8053
8054         * remote.c (remote_hostio_close_cleanup): Delete.
8055         (class scoped_remote_fd): New.
8056         (remote_file_put, remote_file_get): Use it.
8057
8058 2018-05-22  Pedro Alves  <palves@redhat.com>
8059
8060         (struct vCont_action_support): Use bool and initialize all fields.
8061         (struct readahead_cache): Initialize all fields.
8062         (remote_state): Use bool and initialize all fields.
8063         (remote_state::remote_state, remote_state::~remote_state): New.
8064         (new_remote_state): Delete.
8065         (_initialize_remote): Use new to allocate remote_state.
8066
8067 2018-05-22  Pedro Alves  <palves@redhat.com>
8068             張俊芝  <zjz@zjz.name>
8069
8070         PR gdb/22973
8071         * c-exp.y: Include "c-support.h".
8072         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8073         of tolower.  Use c_ident_is_alpha to scan names.
8074         * c-lang.c: Include "c-support.h".
8075         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8076         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8077         * c-support.h: New file, with bits factored out from ...
8078         * cp-name-parser.y: ... this file.
8079         Include "c-support.h".
8080         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8081         c-support.h and renamed.
8082         (symbol_end, yylex): Adjust.
8083
8084 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8085
8086         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8087         parameter type to CORE_ADDR.
8088         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8089         parameter type in declaration to CORE_ADDR.
8090         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8091         target_auxv_search to get AT_HWCAP and use the result to get the
8092         target description.
8093         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8094         to CORE_ADDR. Remove the cast of the return value to unsigned
8095         long. Fix error predicate of target_auxv_search.
8096         (ppc_linux_nat_target::read_description): Change the type of the
8097         hwcap variable to CORE_ADDR.
8098
8099 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8100
8101         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8102         if the size of fpscr is larger than 32 bits.
8103
8104 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8105
8106         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8107         (ppc32_linux_vsxregmap): New global.
8108         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8109         regcache_supply_regset, and regcache_collect_regset.
8110         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8111         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8112         (fetch_vsx_register, store_vsx_register): Remove.
8113         (fetch_vsx_registers): Add regno parameter. Get regset using
8114         ppc_linux_vsxregset. Use regset to supply registers.
8115         (store_vsx_registers): Add regno parameter. Get regset using
8116         ppc_linux_vsxregset. Use regset to collect registers.
8117         (fetch_register): Call fetch_vsx_registers instead of
8118         fetch_vsx_register.
8119         (store_register): Call store_vsx_registers instead of
8120         store_vsx_register.
8121         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8122         new regno parameter.
8123         (store_ppc_registers): Call store_vsx_registers with -1 for the
8124         new regno parameter.
8125         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8126         (ppc_collect_vsxregset): Remove.
8127
8128 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8129
8130         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8131         offset fields.
8132         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8133         for vector register offset fields.
8134         (ppc64_fbsd_reg_offsets): Likewise.
8135         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8136         to vector register offset fields.
8137         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8138         to vector register offset fields.
8139         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8140         vector register offset fields.
8141         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8142         initializers for vector register offset fields.
8143         (rs6000_aix64_reg_offsets): Likewise.
8144         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8145         (ppc_supply_vrregset): Remove.
8146         (ppc_collect_vrregset): Remove.
8147         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8148         (ppc_linux_vrregset) : New function.
8149         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8150         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8151         (ppc32_linux_vrregset): Remove.
8152         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8153         and use result instead of ppc32_linux_vrregset.
8154         (ppc32_linux_reg_offsets): Remove initializers for vector register
8155         offset fields.
8156         (ppc64_linux_reg_offsets): Likewise.
8157         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8158         * ppc-linux-nat.c: Include regset.h.
8159         (gdb_vrregset_t): Adjust comment to account for little-endian
8160         mode.
8161         (supply_vrregset, fill_vrregset): Remove.
8162         (fetch_altivec_register, store_altivec_register): Remove.
8163         (fetch_altivec_registers): Add regno parameter. Get regset using
8164         ppc_linux_vrregset. Use regset to supply registers.
8165         (store_altivec_registers): Add regno parameter. Get regset using
8166         ppc_linux_vrregset. Use regset to collect registers.
8167         (fetch_register): Call fetch_altivec_registers instead of
8168         fetch_altivec_register.
8169         (store_register): Call store_altivec_registers instead of
8170         store_altivec_register.
8171         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8172         the new regno parameter.
8173         (store_ppc_registers): Call store_altivec_registers with -1 for
8174         the new regno parameter.
8175
8176 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8177
8178         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8179         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8180         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8181         (gdb_vrregset_t): Change array type size to
8182         PPC_LINUX_SIZEOF_VRREGSET.
8183         (gdb_vsxregset_t): Change array type size to
8184         PPC_LINUX_SIZEOF_VSXREGSET.
8185         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8186         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8187         PPC_LINUX_SIZEOF_VSXREGSET.
8188
8189 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8190
8191         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8192         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8193         nat/ppc-linux.c.
8194         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8195         ppc_linux_target_wordsize with tid.
8196         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8197         wordsize with tid.
8198         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8199         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8200         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8201         tid parameter. Remove static specifier.
8202         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8203         (ppc_linux_target_wordsize): New declaration.
8204
8205 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8206
8207         * arch/ppc-linux-common.c: New file.
8208         * arch/ppc-linux-common.h: New file.
8209         * arch/ppc-linux-tdesc.h: New file.
8210         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8211         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8212         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8213         arch/ppc-linux-tdesc.h.
8214         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8215         arch/ppc-linux-tdesc.h.
8216         (ppc_linux_nat_target::read_description): Remove target
8217         description matching code. Fill a ppc_linux_features struct and
8218         call ppc_linux_match_description with it. Move comment about ISA
8219         2.05 to ppc-linux-common.c.
8220         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8221         arch/ppc-linux-tdesc.h.
8222         (ppc_linux_core_read_description): Remove target description
8223         matching code. Fill a ppc_linux_features struct and call
8224         ppc_linux_match_description with it.
8225         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8226         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8227         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8228         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8229         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8230         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8231         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8232         (tdesc_powerpc_e500l): Remove.
8233
8234 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8235
8236         * ada-lang.c (catch_assert_command): Pass empty string instead
8237         of NULL for excep_string argument.
8238
8239 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8240
8241         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8242         the width of the requested register exceeds the width of the
8243         `ptrace' data type.
8244
8245 2018-05-21  Tom Tromey  <tom@tromey.com>
8246
8247         * printcmd.c (output_command): Remove.
8248         (output_command_const): Rename to output_command.
8249         * valprint.h (output_command): Rename from output_command_const.
8250         * tracepoint.c (trace_dump_actions): Call output_command.
8251
8252 2018-05-21  Tom Tromey  <tom@tromey.com>
8253
8254         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8255         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8256         * ada-lang.h (create_ada_exception_catchpoint): Update.
8257         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8258         std::string.
8259         (create_excep_cond_exprs, ~ada_catchpoint)
8260         (should_stop_exception, print_one_exception)
8261         (print_mention_exception, print_recreate_exception): Update.
8262         (ada_get_next_arg): Remove.
8263         (catch_ada_exception_command_split): Use std::string.  Change type
8264         of "excep_string", "cond_string".
8265         (catch_ada_exception_command): Update.
8266         (create_ada_exception_catchpoint): Change type of excep_string.
8267         (ada_exception_sal): Remove excep_string parameter.
8268         (~ada_catchpoint): Remove.
8269
8270 2018-05-21  Tom Tromey  <tom@tromey.com>
8271
8272         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8273         cleanup.
8274
8275 2018-05-21  Tom Tromey  <tom@tromey.com>
8276
8277         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8278         Return unique_xmalloc_ptr.
8279         (print_it_exception): Update.
8280
8281 2018-05-21  Tom Tromey  <tom@tromey.com>
8282
8283         * tracepoint.c (trace_dump_actions): Use std::string.
8284
8285 2018-05-21  Tom Tromey  <tom@tromey.com>
8286
8287         * symfile.c (reread_symbols): Use std::string for original_name.
8288
8289 2018-05-21  Tom Tromey  <tom@tromey.com>
8290
8291         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8292         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8293         constructor.
8294
8295 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8296
8297         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8298         instance to...
8299         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8300         * objfiles.c (get_objfile_bfd_data): Allocate
8301         objfile_per_bfd_storage with obstack_new when allocating on
8302         obstack.
8303
8304 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8305
8306         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8307         OBSTACK_ZALLOC.
8308         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8309         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8310         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8311         (add_pending): Likewise.
8312         (parse_symbol): Likewise.
8313         (parse_partial_symbols): Likewise.
8314         (psymtab_to_symtab_1): Likewise.
8315         (new_psymtab): Likewise.
8316         (elfmdebug_build_psymtabs): Likewise.
8317         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8318         * objfiles.c (get_objfile_bfd_data): Likewise.
8319         (objfile_register_static_link): Likewise.
8320         * psymtab.c (allocate_psymtab): Likewise.
8321         * stabsread.c (read_member_functions): Likewise.
8322         * xcoffread.c (xcoff_end_psymtab): Likewise.
8323
8324 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8325
8326         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8327         compiler supports std::is_trivially_constructible.
8328         * common/poison.h: Include obstack.h.
8329         (IsMallocable): Define to is_trivially_constructible if the
8330         compiler supports it, define to true_type otherwise.
8331         (xobnew): New.
8332         (XOBNEW): Redefine.
8333         (xobnewvec): New.
8334         (XOBNEWVEC): Redefine.
8335         * gdb_obstack.h (obstack_zalloc): New.
8336         (OBSTACK_ZALLOC): Redefine.
8337         (obstack_calloc): New.
8338         (OBSTACK_CALLOC): Redefine.
8339         (obstack_new): New.
8340         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8341         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8342         gdbarch.c.
8343         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8344         obstack_calloc/obstack_zalloc.
8345         (gdbarch_obstack_zalloc): Remove.
8346         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8347
8348 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8349
8350         * stack.c (backtrace_command_1): Remove useless variable int i.
8351
8352 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8353
8354         * stack.c (print_frame_info): Fix comment.
8355
8356 2018-05-18  Tom Tromey  <tom@tromey.com>
8357
8358         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8359         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8360         (~dwarf2_per_objfile): Update
8361         (dwarf2_get_dwz_file): Use new.
8362         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8363         unique_ptr.
8364
8365 2018-05-18  Tom Tromey  <tom@tromey.com>
8366
8367         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8368         unique_ptr.
8369         * dwarf2read.c (struct dwp_file): Add constructor and
8370         initializers.
8371         (open_and_init_dwp_file): Return a unique_ptr.
8372         (dwarf2_per_objfile, create_dwp_hash_table)
8373         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8374         (lookup_dwo_unit_in_dwp): Update.
8375         (open_and_init_dwp_file, get_dwp_file): Update.
8376
8377 2018-05-18  Tom Tromey  <tom@tromey.com>
8378
8379         * dwarf2read.c (dwarf2_per_objfile): Update.
8380         (struct mapped_index): Add initializers.
8381         (dwarf2_read_index): Use new.
8382         (dw2_symtab_iter_init): Update.
8383         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8384         unique_ptr.
8385
8386 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8387
8388         * dwarf2read.c (mapped_index) <total_size>: Remove.
8389
8390 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8391
8392         * unittests/format_pieces-selftests.c (test_format_specifier):
8393         Add ARI comments.
8394
8395 2018-05-18  Tom Tromey  <tom@tromey.com>
8396
8397         * c-typeprint.c (maybe_print_hole): New function.
8398         (c_print_type_struct_field_offset): Update.
8399         (c_type_print_base_struct_union): Call maybe_print_hole.
8400
8401 2018-05-17  Keith Seitz  <keiths@redhat.com>
8402
8403         * breakpoint.c (build_bpstat_chain): New function, moved from
8404         bpstat_stop_status.
8405         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8406         If no stop chain is passed, call build_bpstat_chain to build it.
8407         * breakpoint.h (build_bpstat_chain): Declare.
8408         (bpstat_stop_status): Move documentation here from breakpoint.c.
8409         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8410         build the stop chain and pass it to skip_inline_frames.
8411         Pass this stop chain to bpstat_stop_status.
8412         * inline-frame.c: Include breakpoint.h.
8413         (stopped_by_user_bp_inline_frame): New function.
8414         (skip_inline_frames): Add parameter `stop_chain'.
8415         Move documention to inline-frame.h.
8416         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8417         whether the frame should be elided.
8418         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8419         Add moved documentation and update for new parameter.
8420
8421 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8422
8423         PR cli/14975
8424         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8425         unittests/format_pieces-selftests.c.
8426         * common/format.h (format_piece) <operator==>: New.
8427         (format_pieces) <operator[]>: Remove.
8428         * common/format.c (format_pieces::format_pieces): Handle \e.
8429         * unittests/format_pieces-selftests.c: New.
8430
8431 2018-05-17  Tom Tromey  <tom@tromey.com>
8432
8433         PR symtab/23010:
8434         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8435         (dw2_instantiate_symtab): Add skip_partial parameter.
8436         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8437         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8438         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8439         (dw2_expand_symtabs_matching_one)
8440         (dw2_find_pc_sect_compunit_symtab)
8441         (dw2_debug_names_lookup_symbol)
8442         (dw2_debug_names_expand_symtabs_for_function): Update.
8443         (init_cutu_and_read_dies): Add skip_partial parameter.
8444         (process_psymtab_comp_unit, build_type_psymtabs_1)
8445         (process_skeletonless_type_unit, load_partial_comp_unit)
8446         (psymtab_to_symtab_1): Update.
8447         (load_full_comp_unit): Add skip_partial parameter.
8448         (process_imported_unit_die, dwarf2_read_addr_index)
8449         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8450         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8451         (read_signatured_type): Update.
8452
8453 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8454
8455         * value.c (release_value): Remove unused variable.
8456         (record_latest_value): Likewise.
8457         (access_value_history): Likewise.
8458         (preserve_values): Likewise.
8459
8460 2018-05-17  Tom Tromey  <tom@tromey.com>
8461
8462         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8463         Initialize.
8464
8465 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8466
8467         PR gdb/22286
8468         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8469         Also handle registers whose width is not a multiple of
8470         PTRACE_TYPE_RET.
8471         (linux_nat_trad_target::store_register): Likewise.
8472
8473 2018-05-16  Tom Tromey  <tom@tromey.com>
8474
8475         * gdbcore.h (core_bfd): Redefine.
8476         * corelow.c (core_target::close): Update.
8477         (core_target_open): Update.
8478         * progspace.h (struct program_space) <cbfd>: Now a
8479         gdb_bfd_ref_ptr.
8480
8481 2018-05-16  Tom Tromey  <tom@tromey.com>
8482
8483         PR cli/19551:
8484         * symfile-add-flags.h (enum symfile_add_flags)
8485         <SYMFILE_NOT_FILENAME>: New constant.
8486         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8487         objfile name from BFD.
8488         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8489         * minidebug.c (find_separate_debug_file_in_section): Put
8490         ".gnu_debugdata" into BFD's file name.
8491
8492 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8493
8494         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8495         Remove.
8496
8497 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8498
8499         PR binutils/21446
8500         * aarch64-tdep.c (aarch64_analyze_prologue,
8501         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8502         Indicate not interested in errors.
8503
8504 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8505
8506         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8507         Supply the MIPS_ZERO_REGNUM register.
8508
8509 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8510
8511         * mips-tdep.c (mask_address_var): Make variable static.
8512
8513 2018-05-14  Tom Tromey  <tom@tromey.com>
8514
8515         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8516
8517 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8518
8519         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8520         FXSAVE_ADDR for the mxcsr register.
8521
8522 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8523
8524         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8525
8526 2018-05-11  Pedro Alves  <palves@redhat.com>
8527
8528         * corelow.c (core_target) <core_target>: No longer inline.
8529         Initialize m_core_gdbarch, m_core_vec and build the section table
8530         here.
8531         <~core_target>: New.
8532         <core_gdbarch, get_core_register_section>: New methods.
8533         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8534         factored out from ...
8535         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8536         (core_ops): Delete.
8537         (sniff_core_bfd): Add gdbarch parameter.
8538         (core_close): Delete, merged into ...
8539         (core_target::close): ... here.  Delete self.
8540         (core_close_cleanup): Delete.
8541         (core_target_open): Allocate a core_target on the heap.  Use a
8542         unique_ptr instead of a cleanup.  Bits moved into the core_target
8543         ctor.  Adjust to use core_target methods instead of globals.
8544         (get_core_register_section): Rename to ...
8545         (core_target::get_core_register_section): ... this and adjust.
8546         (struct get_core_registers_cb_data): New.
8547         (get_core_registers_cb): Use it.  Use bool.
8548         (core_target::fetch_registers, core_target::files_info)
8549         (core_target::xfer_partial, core_target::read_description)
8550         (core_target::pid_to, core_target::thread_name): Adjust to
8551         reference class fields instead of globals.
8552         * target.h (struct target_ops_deleter, target_ops_up): New.
8553
8554 2018-05-11  Pedro Alves  <palves@redhat.com>
8555
8556         * corefile.c (core_file_command): Move to corelow.c.
8557         * corelow.c (the_core_target): Delete.
8558         (core_file_command): Moved from corefile.c.  Check exec_bfd
8559         instead of the_core_target.  Use target_detach instead of calling
8560         into the_core_target directly.
8561         (maybe_say_no_core_file_now): New.
8562         (core_target::detach): Use it.
8563         (_initialize_corelow): Remove references to the_core_target.
8564         * gdbcore.h (the_core_target): Delete.
8565
8566 2018-05-11  Tom Tromey  <tromey@redhat.com>
8567             Pedro Alves  <palves@redhat.com>
8568
8569         * corefile.c (core_bfd): Remove.
8570         * gdbcore.h (core_bfd): Now a macro.
8571         * progspace.h (struct program_space) <cbfd>: New field.
8572
8573 2018-05-11  Tom Tromey  <tom@tromey.com>
8574
8575         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8576         gdb::def_vector.
8577
8578 2018-05-10  Tom Tromey  <tom@tromey.com>
8579
8580         * configure: Rebuild.
8581         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8582
8583 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8584
8585         PR server/23158:
8586         * regformats/regdat.sh: Adjust script, following the addition
8587         of the new expedite_regs parameter to init_target_desc.
8588
8589 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8590     
8591         PR gdb/23127
8592         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8593         set_gdbarch_significant_addr_bit.
8594         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8595         set_gdbarch_significant_addr_bit.
8596         * utils.c (address_significant): Update to sign extend addr.
8597
8598 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8599
8600         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8601         (xtensa_linux_init_abi): Limit tdep->num_regs by
8602         tdep->num_nopriv_regs.
8603         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8604         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8605         not initialized.
8606
8607 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8608
8609         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8610
8611 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8612
8613         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8614         (I387_MXCSR_INIT_VAL): New constant.
8615         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8616         buffer if it was supplied by the inferior.
8617         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8618         (i387_xsave_get_clear_bv): New function.
8619         (i387_supply_xsave): Only read x87 control registers from the
8620         xsave buffer if the feature is enabled, and the state will have
8621         been written, otherwise, provide a suitable default.
8622         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8623         including x87 control registers.  Update control registers if they
8624         have changed from the default value, and mark features as enabled
8625         as required.
8626         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8627
8628 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8629
8630         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8631
8632 2018-05-07  Tom Tromey  <tom@tromey.com>
8633
8634         * configure: Rebuild.
8635         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8636
8637 2018-05-07  Tom Tromey  <tom@tromey.com>
8638
8639         PR tdep/20362:
8640         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8641         bit.  Use correct value for VDIV.
8642
8643 2018-05-04  Tom Tromey  <tom@tromey.com>
8644
8645         * configure: Rebuild.
8646         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8647
8648 2018-05-04  Tom Tromey  <tom@tromey.com>
8649
8650         * linux-record.c (record_linux_system_call) <case
8651         RECORD_SYS_RECVFROM>: Add "break".
8652
8653 2018-05-04  Tom Tromey  <tom@tromey.com>
8654
8655         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8656         Add missing "break".
8657         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8658         Add missing "break".
8659
8660 2018-05-04  Tom Tromey  <tom@tromey.com>
8661
8662         * rs6000-tdep.c (ppc_process_record_op4)
8663         (ppc_process_record_op63): Add fall-through comment.
8664
8665 2018-05-04  Tom Tromey  <tom@tromey.com>
8666
8667         * i386-tdep.c (i386_process_record): Add fall-through comment.
8668
8669 2018-05-04  Tom Tromey  <tom@tromey.com>
8670
8671         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8672         comment.
8673
8674 2018-05-04  Tom Tromey  <tom@tromey.com>
8675
8676         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8677         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8678         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8679         comment.
8680         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8681         comment.
8682         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8683         comment.
8684
8685 2018-05-04  Tom Tromey  <tom@tromey.com>
8686
8687         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8688
8689 2018-05-04  Tom Tromey  <tom@tromey.com>
8690
8691         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8692         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8693         * symfile.c (section_is_mapped): Fix fall-through comment.
8694         * stabsread.c (define_symbol, read_member_functions): Fix
8695         fall-through comment.
8696         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8697         comment.
8698         * remote.c (remote_wait_as): Fix fall-through comment.
8699         * p-exp.y (yylex): Fix fall-through comment.
8700         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8701         comment.
8702         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8703         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8704         * jv-exp.y (yylex): Fix fall-through comment.
8705         * go-exp.y (lex_one_token): Fix fall-through comment.
8706         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8707         fall-through comment.
8708         * f-exp.y (yylex): Fix fall-through comment.
8709         * dwarf2read.c (process_die): Fix fall-through comments.
8710         * dbxread.c (process_one_symbol): Fix fall-through comment.
8711         * d-exp.y (lex_one_token): Fix fall-through comment.
8712         * cp-name-parser.y (yylex): Fix fall-through comment.
8713         * coffread.c (coff_symtab_read): Fix fall-through comment.
8714         * c-exp.y (lex_one_token): Fix fall-through comment.
8715         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8716         comment.
8717         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8718         comment.
8719
8720 2018-05-04  Tom Tromey  <tom@tromey.com>
8721
8722         PR python/22730:
8723         * NEWS: Mention gdb.execute change.
8724         * gdbcmd.h (execute_control_command): Don't declare.
8725         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8726         execute_control_commands, execute_control_commands_to_string.
8727         * cli/cli-script.h (execute_control_commands)
8728         (execute_control_commands_to_string): Declare.
8729         (execute_control_command): Add from_tty parameter.
8730         * cli/cli-script.c (execute_control_commands)
8731         (execute_control_commands_to_string): New functions.
8732         (execute_user_command): Use execute_control_commands.
8733         (execute_control_command_1): Add "from_tty" parameter.  Update.
8734         (execute_control_command): Likewise.
8735
8736 2018-05-04  Tom Tromey  <tom@tromey.com>
8737
8738         PR python/22731:
8739         * NEWS: Mention that breakpoint commands are writable.
8740         * python/py-breakpoint.c (bppy_set_commands): New function.
8741         (breakpoint_object_getset) <"commands">: Use it.
8742
8743 2018-05-04  Tom Tromey  <tom@tromey.com>
8744
8745         * tracepoint.c (actions_command): Update.
8746         * mi/mi-cmd-break.c (mi_command_line_array)
8747         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8748         (mi_read_next_line): Remove.
8749         (mi_cmd_break_commands): Update.
8750         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8751         function_view.
8752         * cli/cli-script.c (get_command_line): Update.
8753         (process_next_line): Use function_view.  Constify.
8754         (recurse_read_control_structure, read_command_lines)
8755         (read_command_lines_1): Change argument types to function_view.
8756         (do_define_command, document_command): Update.
8757         * breakpoint.h (check_tracepoint_command): Don't declare.
8758         * breakpoint.c (check_tracepoint_command): Remove.
8759         (commands_command_1, create_tracepoint_from_upload): Update.
8760
8761 2018-05-04  Tom Tromey  <tom@tromey.com>
8762
8763         PR gdb/11750:
8764         * cli/cli-script.h (enum command_control_type) <define_control>:
8765         New constant.
8766         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8767         (build_command_line, execute_control_command_1)
8768         (process_next_line): Likewise.
8769         (do_define_command): New function, extracted from define_command.
8770         (define_command): Use it.
8771
8772 2018-05-04  Tom Tromey  <tom@tromey.com>
8773
8774         * tracepoint.c (actions_command): Update.
8775         * cli/cli-script.h (read_command_lines): Update.
8776         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8777         (MAX_TMPBUF): Remove define.
8778         (define_command): Use string_printf.
8779         (document_command): Likewise.
8780         * breakpoint.c (commands_command_1): Update.
8781
8782 2018-05-04  Tom Tromey  <tom@tromey.com>
8783
8784         * top.c (execute_command): Update.
8785         * cli/cli-script.h (print_command_lines): Now varargs.
8786         * cli/cli-script.c (print_command_lines): Now varargs.
8787         (execute_control_command_1) <case while_control, case if_control>:
8788         Update.
8789
8790 2018-05-04  Tom Tromey  <tom@tromey.com>
8791
8792         * tracepoint.c (all_tracepoint_actions): Rename from
8793         all_tracepoint_actions_and_cleanup.  Change return type.
8794         (actions_command, encode_actions_1, encode_actions)
8795         (trace_dump_actions, tdump_command): Update.
8796         * remote.c (remote_download_command_source): Update.
8797         * python/python.c (gdbpy_eval_from_control_command)
8798         (python_command, python_interactive_command): Update.
8799         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8800         * guile/guile.c (guile_command)
8801         (gdbscm_eval_from_control_command, guile_command): Update.
8802         * compile/compile.c (compile_code_command)
8803         (compile_print_command, compile_to_object): Update.
8804         * cli/cli-script.h (struct command_lines_deleter): New.
8805         (counted_command_line): New typedef.
8806         (struct command_line): Add constructor, destructor.
8807         <body_list>: Remove.
8808         <body_list_0, body_list_1>: New members.
8809         (command_line_up): Remove typedef.
8810         (read_command_lines, read_command_lines_1, get_command_line):
8811         Update.
8812         (copy_command_lines): Don't declare.
8813         * cli/cli-script.c (build_command_line): Use "new".
8814         (get_command_line): Return counted_command_line.
8815         (print_command_lines, execute_user_command)
8816         (execute_control_command_1, while_command, if_command): Update.
8817         (realloc_body_list): Remove.
8818         (process_next_line, recurse_read_control_structure): Update.
8819         (read_command_lines, read_command_lines_1): Return counted_command_line.
8820         (free_command_lines): Use "delete".
8821         (copy_command_lines): Remove.
8822         (define_command, document_command, show_user_1): Update.
8823         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8824         a counted_command_line.
8825         * breakpoint.h (counted_command_line): Remove typedef.
8826         (breakpoint_set_commands): Update.
8827         * breakpoint.c (check_no_tracepoint_commands)
8828         (validate_commands_for_breakpoint): Update.
8829         (breakpoint_set_commands): Change commands to be a
8830         counted_command_line.
8831         (commands_command_1, update_dprintf_command_list)
8832         (create_tracepoint_from_upload): Update.
8833
8834 2018-05-04  Tom Tromey  <tom@tromey.com>
8835
8836         * cli/cli-decode.h (cmd_list_element): New constructor.
8837         (~cmd_list_element): New destructor.
8838         (struct cmd_list_element): Add initializers.
8839         * cli/cli-decode.c (do_add_cmd): Use "new".
8840         (delete_cmd): Use "delete".
8841
8842 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8843             Pedro Alves <palves@redhat.com>
8844
8845         PR breakpoints/19806 and support for PR external/20207.
8846         * NEWS: Mention Aarch64 watchpoint improvements.
8847         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8848         watchpoints and PR external/20207 watchpoints.
8849         * nat/aarch64-linux-hw-point.c
8850         (kernel_supports_any_contiguous_range): New.
8851         (aarch64_watchpoint_offset): New.
8852         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8853         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8854         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8855         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8856         next_addr_orig_p.  Support PR external/20207 watchpoints.
8857         (aarch64_downgrade_regs): New.
8858         (aarch64_dr_state_insert_one_point): New parameters offset and
8859         addr_orig.
8860         (aarch64_dr_state_remove_one_point): Likewise.
8861         (aarch64_handle_breakpoint): Update caller.
8862         (aarch64_handle_aligned_watchpoint): Likewise.
8863         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8864         aligned_offset.
8865         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8866         aarch64_downgrade_regs.
8867         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8868         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8869         (DR_CONTROL_MASK): ... this.
8870         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8871         (unsigned int aarch64_watchpoint_offset): New prototype.
8872         (aarch64_linux_set_debug_regs): Remove const from state.
8873         * utils.c (align_up, align_down): Move to ...
8874         * common/common-utils.c (align_up, align_down): ... here.
8875         * utils.h (align_up, align_down): Move to ...
8876         * common/common-utils.h (align_up, align_down): ... here.
8877
8878 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8879
8880         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8881         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8882         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8883         Re-implement to match the ABI as summarized in GCC's
8884         gcc/config/sparc/sparc.c.  All callers updated.
8885         (sparc32_store_arguments): Remove assertion.
8886
8887 2018-05-04  Tom Tromey  <tom@tromey.com>
8888
8889         * printcmd.c: Don't include tui.h.
8890         (decode_format): Use skip_spaces.
8891
8892 2018-05-04  Tom Tromey  <tom@tromey.com>
8893
8894         PR gdb/22619:
8895         * printcmd.c (last_count): New global.
8896         (x_command): Use saved count when repeating.
8897
8898 2018-05-04  Tom Tromey  <tom@tromey.com>
8899
8900         * nto-procfs.c (do_closedir_cleanup): Remove.
8901         (procfs_pidlist): Use gdb_dir_up.
8902         * procfs.c (do_closedir_cleanup): Remove.
8903         (proc_update_threads): Use gdb_dir_up.
8904         * common/filestuff.h (struct gdb_dir_deleter): New.
8905         (gdb_dir_up): New typedef.
8906
8907 2018-05-04  Tom Tromey  <tom@tromey.com>
8908
8909         * ada-lang.c (print_mention_exception): Use std::string.
8910
8911 2018-05-04  Tom Tromey  <tom@tromey.com>
8912
8913         * ada-lang.c (create_excep_cond_exprs): Update.
8914         (ada_exception_catchpoint_cond_string): Use std::string.
8915
8916 2018-05-04  Tom Tromey  <tom@tromey.com>
8917
8918         * ada-lang.c (xget_renaming_scope): Return std::string.
8919         (old_renaming_is_invisible): Update.
8920
8921 2018-05-04  Tom Tromey  <tom@tromey.com>
8922
8923         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8924         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8925
8926 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8927
8928         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8929
8930 2018-05-04  Tom Tromey  <tom@tromey.com>
8931
8932         * remote.c (remote_query_supported_append): Change type.
8933         (remote_check_symbols): Update.
8934
8935 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8936
8937         PR gdb/11420
8938         * configure.ac: Prepend libpython.
8939         * python/python-config.py: Likewise.
8940         * configure: Regenerate.
8941
8942 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8943
8944         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8945
8946 2018-05-03  Pedro Alves  <palves@redhat.com>
8947
8948         * s390-linux-nat.c
8949         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8950         override.  Write 'true' instead of '1'.
8951         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8952         declaration.
8953
8954 2018-05-02  Pedro Alves  <palves@redhat.com>
8955
8956         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8957         add_inf_child_target.
8958         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8959         add_inf_child_target.
8960         * aix-thread.c (aix_thread_target_info): New.
8961         (aix_thread_target) <shortname, longname, doc>: Delete.
8962         <info>: New.
8963         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8964         add_inf_child_target.
8965         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8966         add_inf_child_target.
8967         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8968         add_inf_child_target.
8969         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8970         add_inf_child_target.
8971         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8972         add_inf_child_target.
8973         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8974         add_inf_child_target.
8975         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8976         add_inf_child_target.
8977         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8978         add_inf_child_target.
8979         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8980         add_inf_child_target.
8981         * bfd-target.c (target_bfd_target_info): New.
8982         (target_bfd) <shortname, longname, doc>: Delete.
8983         <info>: New.
8984         * bsd-kvm.c (bsd_kvm_target_info): New.
8985         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8986         <info>: New.
8987         (bsd_kvm_target::open): Rename to ...
8988         (bsd_kvm_target_open): ... this.  Adjust.
8989         * bsd-uthread.c (bsd_uthread_target_info): New.
8990         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8991         <info>: New.
8992         * corefile.c (core_file_command): Adjust.
8993         * corelow.c (core_target_info): New.
8994         (core_target) <shortname, longname, doc>: Delete.
8995         <info>: New.
8996         (core_target::open): Rename to ...
8997         (core_target_open): ... this.  Adjust.
8998         * ctf.c (ctf_target_info): New.
8999         (ctf_target) <shortname, longname, doc>: Delete.
9000         <info>: New.
9001         (ctf_target::open): Rename to ...
9002         (ctf_target_open): ... this.
9003         (_initialize_ctf): Adjust.
9004         * exec.c (exec_target_info): New.
9005         (exec_target) <shortname, longname, doc>: Delete.
9006         <info>: New.
9007         (exec_target::open): Rename to ...
9008         (exec_target_open): ... this.
9009         * gdbcore.h (core_target_open): Declare.
9010         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9011         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9012         add_inf_child_target.
9013         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9014         add_inf_child_target.
9015         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9016         add_inf_child_target.
9017         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9018         add_inf_child_target.
9019         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9020         add_inf_child_target.
9021         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9022         add_inf_child_target.
9023         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9024         add_inf_child_target.
9025         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9026         add_inf_child_target.
9027         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9028         add_inf_child_target.
9029         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9030         add_inf_child_target.
9031         * inf-child.c (inf_child_target_info): New.
9032         (inf_child_target::info): New.
9033         (inf_child_open_target): Remove 'target' parameter.  Use
9034         get_native_target instead.
9035         (inf_child_target::open): Delete.
9036         (add_inf_child_target): New.
9037         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9038         Delete.
9039         <info>: New.
9040         (add_inf_child_target): Declare.
9041         (inf_child_open_target): Declare.
9042         * linux-thread-db.c (thread_db_target_info): New.
9043         (thread_db_target) <shortname, longname, doc>: Delete.
9044         <info>: New.
9045         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9046         add_inf_child_target.
9047         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9048         add_inf_child_target.
9049         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9050         add_inf_child_target.
9051         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9052         add_inf_child_target.
9053         * make-target-delegates (print_class): Adjust.
9054         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9055         add_inf_child_target.
9056         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9057         add_inf_child_target.
9058         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9059         add_inf_child_target.
9060         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9061         add_inf_child_target.
9062         * nto-procfs.c (nto_native_target_info): New.
9063         (nto_procfs_target_native) <shortname, longname, doc>:
9064         Delete.
9065         <info>: New.
9066         (nto_procfs_target_info): New.
9067         (nto_procfs_target_procfs) <shortname, longname, doc>:
9068         Delete.
9069         <info>: New.
9070         (init_procfs_targets): Adjust.
9071         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9072         add_inf_child_target.
9073         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9074         add_inf_child_target.
9075         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9076         add_inf_child_target.
9077         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9078         add_inf_child_target.
9079         * ravenscar-thread.c (ravenscar_target_info): New.
9080         (ravenscar_thread_target) <shortname, longname, doc>:
9081         Delete.
9082         <info>: New.
9083         * record-btrace.c (record_btrace_target_info):
9084         (record_btrace_target) <shortname, longname, doc>: Delete.
9085         <info>: New.
9086         (record_btrace_target::open): Rename to ...
9087         (record_btrace_target_open): ... this.  Adjust.
9088         * record-full.c (record_longname, record_doc): New.
9089         (record_full_base_target) <shortname, longname, doc>: Delete.
9090         <info>: New.
9091         (record_full_target_info): New.
9092         (record_full_target): <shortname>: Delete.
9093         <info>: New.
9094         (record_full_core_open_1, record_full_open_1): Update comments.
9095         (record_full_base_target::open): Rename to ...
9096         (record_full_open): ... this.
9097         (cmd_record_full_restore): Update.
9098         (_initialize_record_full): Update.
9099         * remote-sim.c (remote_sim_target_info): New.
9100         (gdbsim_target) <shortname, longname, doc>: Delete.
9101         <info>: New.
9102         (gdbsim_target::open): Rename to ...
9103         (gdbsim_target_open): ... this.
9104         (_initialize_remote_sim): Adjust.
9105         * remote.c (remote_doc): New.
9106         (remote_target_info): New.
9107         (remote_target) <shortname, longname, doc>: Delete.
9108         <info>: New.
9109         (extended_remote_target_info): New.
9110         (extended_remote_target) <shortname, longname, doc>: Delete.
9111         <info>: New.
9112         (remote_target::open_1): Make static.  Adjust.
9113         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9114         * s390-linux-nat.c (_initialize_s390_nat): Use
9115         add_inf_child_target.
9116         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9117         add_inf_child_target.
9118         * sol-thread.c (thread_db_target_info): New.
9119         (sol_thread_target) <shortname, longname, doc>: Delete.
9120         <info>: New.
9121         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9122         add_inf_child_target.
9123         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9124         add_inf_child_target.
9125         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9126         add_inf_child_target.
9127         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9128         add_inf_child_target.
9129         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9130         add_inf_child_target.
9131         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9132         add_inf_child_target.
9133         * spu-linux-nat.c (_initialize_spu_nat): Use
9134         add_inf_child_target.
9135         * spu-multiarch.c (spu_multiarch_target_info): New.
9136         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9137         <info>: New.
9138         * target-delegates.c: Regenerate.
9139         * target.c: Include <unordered_map>.
9140         (target_ops_p): Delete.
9141         (DEF_VEC_P(target_ops_p)): Delete.
9142         (target_factories): New.
9143         (test_target_info): New.
9144         (test_target_ops::info): New.
9145         (open_target): Adjust to use target_factories.
9146         (add_target_with_completer): Rename to ...
9147         (add_target): ... this.  Change prototype.  Register target_info
9148         and open callback in target_factories.  Register target_info in
9149         command context instead of target_ops.
9150         (add_target): Delete old implementation.
9151         (add_deprecated_target_alias): Change prototype.  Adjust.
9152         (the_native_target): New.
9153         (set_native_target, get_native_target): New.
9154         (find_default_run_target): Use the_native_target.
9155         (find_attach_target, find_run_target): Simplify.
9156         (target_ops::open): Delete.
9157         (dummy_target_info): New.
9158         (dummy_target::shortname, dummy_target::longname)
9159         (dummy_target::doc): Delete.
9160         (dummy_target::info): New.
9161         (debug_target::shortname, debug_target::longname)
9162         (debug_target::doc): Delete.
9163         (debug_target::info): New.
9164         * target.h (struct target_info): New.
9165         (target_ops::~target_ops): Add comment.
9166         (target_ops::info): New.
9167         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9168         longer virtual.  Implement in terms of target_info.
9169         (set_native_target, get_native_target): Declare.
9170         (target_open_ftype): New.
9171         (add_target, add_target_with_completer)
9172         (add_deprecated_target_alias): Change prototype.
9173         (test_target) <shortname, longname, doc>: Delete.
9174         <info>: New.
9175         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9176         add_inf_child_target.
9177         * tracefile-tfile.c (tfile_target_info): New.
9178         (tfile_target) <shortname, longname, doc>: Delete.
9179         <info>: New.
9180         (tfile_target::open): Rename to ...
9181         (tfile_target_open): ... this.
9182         (_initialize_tracefile_tfile): Adjust.
9183         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9184         add_inf_child_target.
9185         * windows-nat.c (_initialize_windows_nat): Use
9186         add_inf_child_target.
9187         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9188         add_inf_child_target.
9189
9190 2018-05-02  Pedro Alves  <palves@redhat.com>
9191
9192         * linux-nat.h (linux_nat_target) <low_new_thread,
9193         low_delete_thread, low_new_fork, low_forget_process,
9194         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9195         New virtual methods.
9196         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9197         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9198         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9199         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9200         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9201         Delete.
9202         * linux-fork.c (delete_fork): Adjust to call low method.
9203         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9204         (linux_nat_new_fork, linux_nat_forget_process_hook)
9205         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9206         (linux_nat_status_is_event):
9207         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9208         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9209         to call low method.
9210         (sigtrap_is_event): Rename to ...
9211         (linux_nat_target::low_status_is_event): ... this.
9212         (linux_nat_set_status_is_event): Delete.
9213         (save_stop_reason, linux_nat_wait_1)
9214         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9215         low methods.
9216         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9217         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9218         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9219         (linux_nat_set_prepare_to_resume): Delete.
9220         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9221         low virtual methods.
9222         * amd64-linux-nat.c: Likewise.
9223         * arm-linux-nat.c: Likewise.
9224         * i386-linux-nat.c: Likewise.
9225         * ia64-linux-nat.c: Likewise.
9226         * mips-linux-nat.c: Likewise.
9227         * ppc-linux-nat.c: Likewise.
9228         * s390-linux-nat.c: Likewise.
9229         * sparc64-linux-nat.c: Likewise.
9230         * x86-linux-nat.c: Likewise.
9231         * x86-linux-nat.h: Include "nat/x86-linux.h".
9232         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9233         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9234         Override methods.
9235
9236 2018-05-02  Pedro Alves  <palves@redhat.com>
9237
9238         * target.h (target_ops)
9239         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9240         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9241         stopped_by_watchpoint, have_continuable_watchpoint,
9242         stopped_data_address, watchpoint_addr_within_range,
9243         can_accel_watchpoint_condition, can_run, thread_alive,
9244         has_all_memory, has_memory, has_stack, has_registers,
9245         has_execution, can_async_p, is_async_p, supports_non_stop,
9246         always_non_stop_p, can_execute_reverse, supports_multi_process,
9247         supports_enable_disable_tracepoint,
9248         supports_disable_randomization, supports_string_tracing,
9249         supports_evaluation_of_breakpoint_conditions,
9250         can_run_breakpoint_commands, filesystem_is_local,
9251         can_download_tracepoint, get_trace_state_variable_value,
9252         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9253         record_is_replaying, record_will_replay,
9254         augmented_libraries_svr4_read>: Adjust to return bool.
9255         * aarch64-linux-nat.c: All implementations adjusted.
9256         * aix-thread.c: All implementations adjusted.
9257         * arm-linux-nat.c: All implementations adjusted.
9258         * breakpoint.c: All implementations adjusted.
9259         * bsd-kvm.c: All implementations adjusted.
9260         * bsd-uthread.c: All implementations adjusted.
9261         * corelow.c: All implementations adjusted.
9262         * ctf.c: All implementations adjusted.
9263         * darwin-nat.c: All implementations adjusted.
9264         * darwin-nat.h: All implementations adjusted.
9265         * exec.c: All implementations adjusted.
9266         * fbsd-nat.c: All implementations adjusted.
9267         * fbsd-nat.h: All implementations adjusted.
9268         * gnu-nat.c: All implementations adjusted.
9269         * gnu-nat.h: All implementations adjusted.
9270         * go32-nat.c: All implementations adjusted.
9271         * ia64-linux-nat.c: All implementations adjusted.
9272         * inf-child.c: All implementations adjusted.
9273         * inf-child.h: All implementations adjusted.
9274         * inf-ptrace.c: All implementations adjusted.
9275         * inf-ptrace.h: All implementations adjusted.
9276         * linux-nat.c: All implementations adjusted.
9277         * linux-nat.h: All implementations adjusted.
9278         * mips-linux-nat.c: All implementations adjusted.
9279         * nto-procfs.c: All implementations adjusted.
9280         * ppc-linux-nat.c: All implementations adjusted.
9281         * procfs.c: All implementations adjusted.
9282         * ravenscar-thread.c: All implementations adjusted.
9283         * record-btrace.c: All implementations adjusted.
9284         * record-full.c: All implementations adjusted.
9285         * remote-sim.c: All implementations adjusted.
9286         * remote.c: All implementations adjusted.
9287         * s390-linux-nat.c: All implementations adjusted.
9288         * sol-thread.c: All implementations adjusted.
9289         * spu-multiarch.c: All implementations adjusted.
9290         * target-delegates.c: All implementations adjusted.
9291         * target.c: All implementations adjusted.
9292         * target.h: All implementations adjusted.
9293         * tracefile-tfile.c: All implementations adjusted.
9294         * tracefile.c: All implementations adjusted.
9295         * tracefile.h: All implementations adjusted.
9296         * windows-nat.c: All implementations adjusted.
9297         * x86-linux-nat.h: All implementations adjusted.
9298         * x86-nat.h: All implementations adjusted.
9299
9300 2018-05-02  Pedro Alves  <palves@redhat.com>
9301
9302         * make-target-delegates (scan_target_h): Don't trim lines here.
9303         Replace sequences of tabs and/or whitespace with a single
9304         whitespace.
9305         (top level, parsing methods): Trim each line before processing it
9306         here.
9307
9308 2018-05-02  Pedro Alves  <palves@redhat.com>
9309             John Baldwin  <jhb@freebsd.org>
9310
9311         * target.h (enum strata) <debug_stratum>: New.
9312         (struct target_ops) <all delegation methods>: Replace by C++
9313         virtual methods, and drop "to_" prefix.  All references updated
9314         throughout.
9315         <to_shortname, to_longname, to_doc, to_data,
9316         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9317         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9318         virtual methods.  All references updated throughout.
9319         <can_attach, supports_terminal_ours, can_create_inferior,
9320         get_thread_control_capabilities, attach_no_wait>: New
9321         virtual methods.
9322         <insert_breakpoint, remove_breakpoint>: Now
9323         TARGET_DEFAULT_NORETURN methods.
9324         <info_proc>: Now returns bool.
9325         <to_magic>: Delete.
9326         (OPS_MAGIC): Delete.
9327         (current_target): Delete.  All references replaced by references
9328         to ...
9329         (target_stack): ... this.  New.
9330         (target_shortname, target_longname): Adjust.
9331         (target_can_run): Now a function declaration.
9332         (default_child_has_all_memory, default_child_has_memory)
9333         (default_child_has_stack, default_child_has_registers)
9334         (default_child_has_execution): Remove target_ops parameter.
9335         (complete_target_initialization): Delete.
9336         (memory_breakpoint_target): New template class.
9337         (test_target_ops): Refactor as a C++ class with virtual methods.
9338         * make-target-delegates (NAME_PART): Tighten.
9339         (POINTER_PART, CP_SYMBOL): New.
9340         (SIMPLE_RETURN_PART): Reimplement.
9341         (VEC_RETURN_PART): Expect less.
9342         (RETURN_PART, VIRTUAL_PART): New.
9343         (METHOD): Adjust to C++ virtual methods.
9344         (scan_target_h): Remove reference to C99.
9345         (dname): Output "target_ops::" prefix.
9346         (write_function_header): Adjust to output a C++ class method.
9347         (write_declaration): New.
9348         (write_delegator): Adjust to output a C++ class method.
9349         (tdname): Output "dummy_target::" prefix.
9350         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9351         method.
9352         (tdefault_names, debug_names): Delete.
9353         (return_types, tdefaults, styles, argtypes_array): New.
9354         (top level): All methods are delegators.
9355         (print_class): New.
9356         (top level): Print dummy_target and debug_target classes.
9357         * target-delegates.c: Regenerate.
9358         * target-debug.h (target_debug_print_enum_info_proc_what)
9359         (target_debug_print_thread_control_capabilities)
9360         (target_debug_print_thread_info_p): New.
9361         * target.c (dummy_target): Delete.
9362         (the_dummy_target, the_debug_target): New.
9363         (target_stack): Now extern.
9364         (set_targetdebug): Push/unpush debug target.
9365         (default_child_has_all_memory, default_child_has_memory)
9366         (default_child_has_stack, default_child_has_registers)
9367         (default_child_has_execution): Remove target_ops parameter.
9368         (complete_target_initialization): Delete.
9369         (add_target_with_completer): No longer call
9370         complete_target_initialization.
9371         (target_supports_terminal_ours): Use regular delegation.
9372         (update_current_target): Delete.
9373         (push_target): No longer check magic number.  Don't call
9374         update_current_target.
9375         (unpush_target): Don't call update_current_target.
9376         (target_is_pushed): No longer check magic number.
9377         (target_require_runnable): Skip for all stratums over
9378         process_stratum.
9379         (target_ops::info_proc): New.
9380         (target_info_proc): Use find_target_at and
9381         find_default_run_target.
9382         (target_supports_disable_randomization): Use regular delegation.
9383         (target_get_osdata): Use find_target_at.
9384         (target_ops::open, target_ops::close, target_ops::can_attach)
9385         (target_ops::attach, target_ops::can_create_inferior)
9386         (target_ops::create_inferior, target_ops::can_run)
9387         (target_can_run): New.
9388         (default_fileio_target): Use regular delegation.
9389         (target_ops::fileio_open, target_ops::fileio_pwrite)
9390         (target_ops::fileio_pread, target_ops::fileio_fstat)
9391         (target_ops::fileio_close, target_ops::fileio_unlink)
9392         (target_ops::fileio_readlink): New.
9393         (target_fileio_open_1, target_fileio_unlink)
9394         (target_fileio_readlink): Always call the target method.  Handle
9395         FILEIO_ENOSYS.
9396         (return_zero, return_zero_has_execution): Delete.
9397         (init_dummy_target): Delete.
9398         (dummy_target::dummy_target, dummy_target::shortname)
9399         (dummy_target::longname, dummy_target::doc)
9400         (debug_target::debug_target, debug_target::shortname)
9401         (debug_target::longname, debug_target::doc): New.
9402         (target_supports_delete_record): Use regular delegation.
9403         (setup_target_debug): Delete.
9404         (maintenance_print_target_stack): Skip debug_stratum.
9405         (initialize_targets): Instantiate the_dummy_target and
9406         the_debug_target.
9407         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9408         use target_stack.
9409         (target_auxv_search, fprint_target_auxv): Adjust.
9410         (info_auxv_command): Adjust to use target_stack.
9411         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9412         * exceptions.c (print_flush): Handle a NULL target_stack.
9413         * regcache.c (target_ops_no_register): Refactor as class with
9414         virtual methods.
9415
9416         * exec.c (exec_target): New class.
9417         (exec_ops): Now an exec_target.
9418         (exec_open, exec_close_1, exec_get_section_table)
9419         (exec_xfer_partial, exec_files_info, exec_has_memory)
9420         (exec_make_note_section): Refactor as exec_target methods.
9421         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9422         Delete.
9423         (exec_target::find_memory_regions): New.
9424         (_initialize_exec): Don't call init_exec_ops.
9425         * gdbcore.h (exec_file_clear): Delete.
9426
9427         * corefile.c (core_target): Delete.
9428         (core_file_command): Adjust.
9429         * corelow.c (core_target): New class.
9430         (the_core_target): New.
9431         (core_close): Remove target_ops parameter.
9432         (core_close_cleanup): Adjust.
9433         (core_target::close): New.
9434         (core_open, core_detach, get_core_registers, core_files_info)
9435         (core_xfer_partial, core_thread_alive, core_read_description)
9436         (core_pid_to_str, core_thread_name, core_has_memory)
9437         (core_has_stack, core_has_registers, core_info_proc): Rework as
9438         core_target methods.
9439         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9440         (_initialize_corelow): Initialize the_core_target.
9441         * gdbcore.h (core_target): Delete.
9442         (the_core_target): New.
9443
9444         * ctf.c: (ctf_target): New class.
9445         (ctf_ops): Now a ctf_target.
9446         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9447         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9448         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9449         methods.
9450         (init_ctf_ops): Delete.
9451         (_initialize_ctf): Don't call it.
9452         * tracefile-tfile.c (tfile_target): New class.
9453         (tfile_ops): Now a tfile_target.
9454         (tfile_open, tfile_close, tfile_files_info)
9455         (tfile_get_tracepoint_status, tfile_trace_find)
9456         (tfile_fetch_registers, tfile_xfer_partial)
9457         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9458         Refactor as tfile_target methods.
9459         (tfile_xfer_partial_features): Remove target_ops parameter.
9460         (init_tfile_ops): Delete.
9461         (_initialize_tracefile_tfile): Don't call it.
9462         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9463         (tracefile_has_stack, tracefile_has_registers)
9464         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9465         tracefile_target methods.
9466         (init_tracefile_ops): Delete.
9467         (tracefile_target::tracefile_target): New.
9468         * tracefile.h: Include "target.h".
9469         (tracefile_target): New class.
9470         (init_tracefile_ops): Delete.
9471
9472         * spu-multiarch.c (spu_multiarch_target): New class.
9473         (spu_ops): Now a spu_multiarch_target.
9474         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9475         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9476         (spu_search_memory, spu_mourn_inferior): Refactor as
9477         spu_multiarch_target methods.
9478         (init_spu_ops): Delete.
9479         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9480         complete_target_initialization.
9481
9482         * ravenscar-thread.c (ravenscar_thread_target): New class.
9483         (ravenscar_ops): Now a ravenscar_thread_target.
9484         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9485         (ravenscar_thread_alive, ravenscar_pid_to_str)
9486         (ravenscar_fetch_registers, ravenscar_store_registers)
9487         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9488         (ravenscar_stopped_by_hw_breakpoint)
9489         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9490         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9491         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9492         methods.
9493         (init_ravenscar_thread_ops): Delete.
9494         (_initialize_ravenscar): Remove references to
9495         init_ravenscar_thread_ops and complete_target_initialization.
9496
9497         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9498         (bsd_uthread_target): New class.
9499         (bsd_uthread_ops): Now a bsd_uthread_target.
9500         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9501         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9502         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9503         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9504         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9505         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9506         (bsd_uthread_target): Delete function.
9507         (_initialize_bsd_uthread): Remove reference to
9508         complete_target_initialization.
9509
9510         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9511         (target_bfd): ... this new class.
9512         (target_bfd_xfer_partial, target_bfd_get_section_table)
9513         (target_bfd_close): Refactor as target_bfd methods.
9514         (target_bfd::~target_bfd): New.
9515         (target_bfd_reopen): Adjust.
9516         (target_bfd::close): New.
9517
9518         * record-btrace.c (record_btrace_target): New class.
9519         (record_btrace_ops): Now a record_btrace_target.
9520         (record_btrace_open, record_btrace_stop_recording)
9521         (record_btrace_disconnect, record_btrace_close)
9522         (record_btrace_async, record_btrace_info)
9523         (record_btrace_insn_history, record_btrace_insn_history_range)
9524         (record_btrace_insn_history_from, record_btrace_call_history)
9525         (record_btrace_call_history_range)
9526         (record_btrace_call_history_from, record_btrace_record_method)
9527         (record_btrace_is_replaying, record_btrace_will_replay)
9528         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9529         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9530         (record_btrace_store_registers, record_btrace_prepare_to_store)
9531         (record_btrace_to_get_unwinder)
9532         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9533         (record_btrace_commit_resume, record_btrace_wait)
9534         (record_btrace_stop, record_btrace_can_execute_reverse)
9535         (record_btrace_stopped_by_sw_breakpoint)
9536         (record_btrace_supports_stopped_by_sw_breakpoint)
9537         (record_btrace_stopped_by_hw_breakpoint)
9538         (record_btrace_supports_stopped_by_hw_breakpoint)
9539         (record_btrace_update_thread_list, record_btrace_thread_alive)
9540         (record_btrace_goto_begin, record_btrace_goto_end)
9541         (record_btrace_goto, record_btrace_stop_replaying_all)
9542         (record_btrace_execution_direction)
9543         (record_btrace_prepare_to_generate_core)
9544         (record_btrace_done_generating_core): Refactor as
9545         record_btrace_target methods.
9546         (init_record_btrace_ops): Delete.
9547         (_initialize_record_btrace): Remove reference to
9548         init_record_btrace_ops.
9549         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9550         the execution_direction global.
9551         (record_full_base_target, record_full_target)
9552         (record_full_core_target): New classes.
9553         (record_full_ops): Now a record_full_target.
9554         (record_full_core_ops): Now a record_full_core_target.
9555         (record_full_target::detach, record_full_target::disconnect)
9556         (record_full_core_target::disconnect)
9557         (record_full_target::mourn_inferior, record_full_target::kill):
9558         New.
9559         (record_full_open, record_full_close, record_full_async): Refactor
9560         as methods of the record_full_base_target class.
9561         (record_full_resume, record_full_commit_resume): Refactor
9562         as methods of the record_full_target class.
9563         (record_full_wait, record_full_stopped_by_watchpoint)
9564         (record_full_stopped_data_address)
9565         (record_full_stopped_by_sw_breakpoint)
9566         (record_full_supports_stopped_by_sw_breakpoint)
9567         (record_full_stopped_by_hw_breakpoint)
9568         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9569         methods of the record_full_base_target class.
9570         (record_full_store_registers, record_full_xfer_partial)
9571         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9572         Refactor as methods of the record_full_target class.
9573         (record_full_can_execute_reverse, record_full_get_bookmark)
9574         (record_full_goto_bookmark, record_full_execution_direction)
9575         (record_full_record_method, record_full_info, record_full_delete)
9576         (record_full_is_replaying, record_full_will_replay)
9577         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9578         (record_full_stop_replaying): Refactor as methods of the
9579         record_full_base_target class.
9580         (record_full_core_resume, record_full_core_kill)
9581         (record_full_core_fetch_registers)
9582         (record_full_core_prepare_to_store)
9583         (record_full_core_store_registers, record_full_core_xfer_partial)
9584         (record_full_core_insert_breakpoint)
9585         (record_full_core_remove_breakpoint)
9586         (record_full_core_has_execution): Refactor
9587         as methods of the record_full_core_target class.
9588         (record_full_base_target::supports_delete_record): New.
9589         (init_record_full_ops): Delete.
9590         (init_record_full_core_ops): Delete.
9591         (record_full_save): Refactor as method of the
9592         record_full_base_target class.
9593         (_initialize_record_full): Remove references to
9594         init_record_full_ops and init_record_full_core_ops.
9595
9596         * remote.c (remote_target, extended_remote_target): New classes.
9597         (remote_ops): Now a remote_target.
9598         (extended_remote_ops): Now an extended_remote_target.
9599         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9600         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9601         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9602         (remote_pass_signals, remote_set_syscall_catchpoint)
9603         (remote_program_signals, )
9604         (remote_thread_always_alive): Remove target_ops parameter.
9605         (remote_thread_alive, remote_thread_name)
9606         (remote_update_thread_list, remote_threads_extra_info)
9607         (remote_static_tracepoint_marker_at)
9608         (remote_static_tracepoint_markers_by_strid)
9609         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9610         (remote_open): Refactor as methods of remote_target.
9611         (extended_remote_open, extended_remote_detach)
9612         (extended_remote_attach, extended_remote_post_attach):
9613         (extended_remote_supports_disable_randomization)
9614         (extended_remote_create_inferior): : Refactor as method of
9615         extended_remote_target.
9616         (remote_set_permissions, remote_open_1, remote_detach)
9617         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9618         (remote_resume, remote_commit_resume, remote_stop)
9619         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9620         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9621         (remote_prepare_to_store, remote_store_registers)
9622         (remote_flash_erase, remote_flash_done, remote_files_info)
9623         (remote_kill, remote_mourn, remote_insert_breakpoint)
9624         (remote_remove_breakpoint, remote_insert_watchpoint)
9625         (remote_watchpoint_addr_within_range)
9626         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9627         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9628         (remote_supports_stopped_by_sw_breakpoint)
9629         (remote_stopped_by_hw_breakpoint)
9630         (remote_supports_stopped_by_hw_breakpoint)
9631         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9632         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9633         (remote_verify_memory): Refactor as methods of remote_target.
9634         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9635         parameter.
9636         (remote_xfer_partial, remote_get_memory_xfer_limit)
9637         (remote_search_memory, remote_rcmd, remote_memory_map)
9638         (remote_pid_to_str, remote_get_thread_local_address)
9639         (remote_get_tib_address, remote_read_description): Refactor as
9640         methods of remote_target.
9641         (remote_target::fileio_open, remote_target::fileio_pwrite)
9642         (remote_target::fileio_pread, remote_target::fileio_close): New.
9643         (remote_hostio_readlink, remote_hostio_fstat)
9644         (remote_filesystem_is_local, remote_can_execute_reverse)
9645         (remote_supports_non_stop, remote_supports_disable_randomization)
9646         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9647         (remote_supports_enable_disable_tracepoint)
9648         (remote_supports_string_tracing)
9649         (remote_can_run_breakpoint_commands, remote_trace_init)
9650         (remote_download_tracepoint, remote_can_download_tracepoint)
9651         (remote_download_trace_state_variable, remote_enable_tracepoint)
9652         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9653         (remote_trace_start, remote_get_trace_status)
9654         (remote_get_tracepoint_status, remote_trace_stop)
9655         (remote_trace_find, remote_get_trace_state_variable_value)
9656         (remote_save_trace_data, remote_get_raw_trace_data)
9657         (remote_set_disconnected_tracing, remote_core_of_thread)
9658         (remote_set_circular_trace_buffer, remote_traceframe_info)
9659         (remote_get_min_fast_tracepoint_insn_len)
9660         (remote_set_trace_buffer_size, remote_set_trace_notes)
9661         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9662         (remote_disable_btrace, remote_teardown_btrace)
9663         (remote_read_btrace, remote_btrace_conf)
9664         (remote_augmented_libraries_svr4_read, remote_load)
9665         (remote_pid_to_exec_file, remote_can_do_single_step)
9666         (remote_execution_direction, remote_thread_handle_to_thread_info):
9667         Refactor as methods of remote_target.
9668         (init_remote_ops, init_extended_remote_ops): Delete.
9669         (remote_can_async_p, remote_is_async_p, remote_async)
9670         (remote_thread_events, remote_upload_tracepoints)
9671         (remote_upload_trace_state_variables): Refactor as methods of
9672         remote_target.
9673         (_initialize_remote): Remove references to init_remote_ops and
9674         init_extended_remote_ops.
9675
9676         * remote-sim.c (gdbsim_target): New class.
9677         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9678         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9679         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9680         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9681         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9682         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9683         Refactor as methods of gdbsim_target.
9684         (gdbsim_ops): Now a gdbsim_target.
9685         (init_gdbsim_ops): Delete.
9686         (gdbsim_cntrl_c): Adjust.
9687         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9688
9689         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9690         (the_amd64_linux_nat_target): New.
9691         (amd64_linux_fetch_inferior_registers)
9692         (amd64_linux_store_inferior_registers): Refactor as methods of
9693         amd64_linux_nat_target.
9694         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9695         * i386-linux-nat.c: Don't include "linux-nat.h".
9696         (i386_linux_nat_target): New class.
9697         (the_i386_linux_nat_target): New.
9698         (i386_linux_fetch_inferior_registers)
9699         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9700         as methods of i386_linux_nat_target.
9701         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9702         * inf-child.c (inf_child_ops): Delete.
9703         (inf_child_fetch_inferior_registers)
9704         (inf_child_store_inferior_registers): Delete.
9705         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9706         methods of inf_child_target.
9707         (inf_child_target::supports_terminal_ours)
9708         (inf_child_target::terminal_init)
9709         (inf_child_target::terminal_inferior)
9710         (inf_child_target::terminal_ours_for_output)
9711         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9712         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9713         New.
9714         (inf_child_open, inf_child_disconnect, inf_child_close)
9715         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9716         (inf_child_post_startup_inferior, inf_child_can_run)
9717         (inf_child_pid_to_exec_file): Refactor as methods of
9718         inf_child_target.
9719         (inf_child_follow_fork): Delete.
9720         (inf_child_target::can_create_inferior)
9721         (inf_child_target::can_attach): New.
9722         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9723         (inf_child_target::has_stack, inf_child_target::has_registers)
9724         (inf_child_target::has_execution): New.
9725         (inf_child_fileio_open, inf_child_fileio_pwrite)
9726         (inf_child_fileio_pread, inf_child_fileio_fstat)
9727         (inf_child_fileio_close, inf_child_fileio_unlink)
9728         (inf_child_fileio_readlink, inf_child_use_agent)
9729         (inf_child_can_use_agent): Refactor as methods of
9730         inf_child_target.
9731         (return_zero, inf_child_target): Delete.
9732         (inf_child_target::inf_child_target): New.
9733         * inf-child.h: Include "target.h".
9734         (inf_child_target): Delete function prototype.
9735         (inf_child_target): New class.
9736         (inf_child_open_target, inf_child_mourn_inferior)
9737         (inf_child_maybe_unpush_target): Delete.
9738         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9739         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9740         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9741         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9742         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9743         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9744         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9745         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9746         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9747         methods of inf_ptrace_target.
9748         (inf_ptrace_target): Delete function.
9749         * inf-ptrace.h: Include "inf-child.h".
9750         (inf_ptrace_target): Delete function declaration.
9751         (inf_ptrace_target): New class.
9752         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9753         * linux-nat.c (linux_target): New.
9754         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9755         (linux_nat_target::~linux_nat_target): New.
9756         (linux_child_post_attach, linux_child_post_startup_inferior)
9757         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9758         (linux_child_remove_fork_catchpoint)
9759         (linux_child_insert_vfork_catchpoint)
9760         (linux_child_remove_vfork_catchpoint)
9761         (linux_child_insert_exec_catchpoint)
9762         (linux_child_remove_exec_catchpoint)
9763         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9764         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9765         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9766         (linux_nat_stopped_data_address)
9767         (linux_nat_stopped_by_sw_breakpoint)
9768         (linux_nat_supports_stopped_by_sw_breakpoint)
9769         (linux_nat_stopped_by_hw_breakpoint)
9770         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9771         (linux_nat_kill, linux_nat_mourn_inferior)
9772         (linux_nat_xfer_partial, linux_nat_thread_alive)
9773         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9774         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9775         (linux_child_static_tracepoint_markers_by_strid)
9776         (linux_nat_is_async_p, linux_nat_can_async_p)
9777         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9778         (linux_nat_supports_multi_process)
9779         (linux_nat_supports_disable_randomization, linux_nat_async)
9780         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9781         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9782         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9783         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9784         methods of linux_nat_target.
9785         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9786         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9787         parameter.
9788         (check_stopped_by_watchpoint): Adjust.
9789         (linux_xfer_partial): Delete.
9790         (linux_target_install_ops, linux_target, linux_nat_add_target):
9791         Delete.
9792         (linux_nat_target::linux_nat_target): New.
9793         * linux-nat.h: Include "inf-ptrace.h".
9794         (linux_nat_target): New.
9795         (linux_target, linux_target_install_ops, linux_nat_add_target):
9796         Delete function declarations.
9797         (linux_target): Declare global.
9798         * linux-thread-db.c (thread_db_target): New.
9799         (thread_db_target::thread_db_target): New.
9800         (thread_db_ops): Delete.
9801         (the_thread_db_target): New.
9802         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9803         (thread_db_update_thread_list, thread_db_pid_to_str)
9804         (thread_db_extra_thread_info)
9805         (thread_db_thread_handle_to_thread_info)
9806         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9807         (thread_db_resume): Refactor as methods of thread_db_target.
9808         (init_thread_db_ops): Delete.
9809         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9810         * x86-linux-nat.c: Don't include "linux-nat.h".
9811         (super_post_startup_inferior): Delete.
9812         (x86_linux_nat_target::~x86_linux_nat_target): New.
9813         (x86_linux_child_post_startup_inferior)
9814         (x86_linux_read_description, x86_linux_enable_btrace)
9815         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9816         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9817         methods of x86_linux_nat_target.
9818         (x86_linux_create_target): Delete.  Bits folded ...
9819         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9820         pointer.
9821         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9822         (x86_linux_nat_target): New class.
9823         (x86_linux_create_target): Delete.
9824         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9825         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9826         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9827         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9828         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9829         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9830         make extern.
9831         (x86_use_watchpoints): Delete.
9832         * x86-nat.h: Include "breakpoint.h" and "target.h".
9833         (x86_use_watchpoints): Delete.
9834         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9835         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9836         (x86_insert_watchpoint, x86_remove_watchpoint)
9837         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9838         (x86_stopped_by_hw_breakpoint): New declarations.
9839         (x86_nat_target): New template class.
9840
9841         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9842         (the_ppc_linux_nat_target): New.
9843         (ppc_linux_fetch_inferior_registers)
9844         (ppc_linux_can_use_hw_breakpoint)
9845         (ppc_linux_region_ok_for_hw_watchpoint)
9846         (ppc_linux_ranged_break_num_registers)
9847         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9848         (ppc_linux_insert_mask_watchpoint)
9849         (ppc_linux_remove_mask_watchpoint)
9850         (ppc_linux_can_accel_watchpoint_condition)
9851         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9852         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9853         (ppc_linux_watchpoint_addr_within_range)
9854         (ppc_linux_masked_watch_num_registers)
9855         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9856         (ppc_linux_read_description): Refactor as methods of
9857         ppc_linux_nat_target.
9858         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9859
9860         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9861         (procfs_target): New class.
9862         (the_procfs_target): New.
9863         (procfs_target): Delete function.
9864         (procfs_auxv_parse, procfs_attach, procfs_detach)
9865         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9866         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9867         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9868         (procfs_create_inferior, procfs_update_thread_list)
9869         (procfs_thread_alive, procfs_pid_to_str)
9870         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9871         (procfs_stopped_data_address, procfs_insert_watchpoint)
9872         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9873         (proc_find_memory_regions, procfs_info_proc)
9874         (procfs_make_note_section): Refactor as methods of procfs_target.
9875         (_initialize_procfs): Adjust.
9876         * sol-thread.c (sol_thread_target): New class.
9877         (sol_thread_ops): Now a sol_thread_target.
9878         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9879         (sol_thread_fetch_registers, sol_thread_store_registers)
9880         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9881         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9882         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9883         (init_sol_thread_ops): Delete.
9884         (_initialize_sol_thread): Adjust.  Remove references to
9885         init_sol_thread_ops and complete_target_initialization.
9886
9887         * windows-nat.c (windows_nat_target): New class.
9888         (windows_fetch_inferior_registers)
9889         (windows_store_inferior_registers, windows_resume, windows_wait)
9890         (windows_attach, windows_detach, windows_pid_to_exec_file)
9891         (windows_files_info, windows_create_inferior)
9892         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9893         (windows_close, windows_pid_to_str, windows_xfer_partial)
9894         (windows_get_tib_address, windows_get_ada_task_ptid)
9895         (windows_thread_name, windows_thread_alive): Refactor as
9896         windows_nat_target methods.
9897         (do_initial_windows_stuff): Adjust.
9898         (windows_target): Delete function.
9899         (_initialize_windows_nat): Adjust.
9900
9901         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9902         (darwin_mourn_inferior, darwin_kill_inferior)
9903         (darwin_create_inferior, darwin_attach, darwin_detach)
9904         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9905         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9906         (darwin_supports_multi_process): Refactor as darwin_nat_target
9907         methods.
9908         (darwin_resume_to, darwin_files_info): Delete.
9909         (_initialize_darwin_inferior): Rename to ...
9910         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9911         * darwin-nat.h: Include "inf-child.h".
9912         (darwin_nat_target): New class.
9913         (darwin_complete_target): Delete.
9914         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9915         (darwin_target): New.
9916         (i386_darwin_fetch_inferior_registers)
9917         (i386_darwin_store_inferior_registers): Refactor as methods of
9918         darwin_nat_target.
9919         (darwin_complete_target): Delete, with ...
9920         (_initialize_i386_darwin_nat): ... bits factored out here.
9921
9922         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9923         (the_alpha_linux_nat_target): New.
9924         (alpha_linux_register_u_offset): Refactor as
9925         alpha_linux_nat_target method.
9926         (_initialize_alpha_linux_nat): Adjust.
9927         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9928         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9929         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9930         methods of linux_nat_trad_target.
9931         (linux_trad_target): Delete.
9932         * linux-nat-trad.h (linux_trad_target): Delete function.
9933         (linux_nat_trad_target): New class.
9934         * mips-linux-nat.c (mips_linux_nat_target): New class.
9935         (super_fetch_registers, super_store_registers, super_close):
9936         Delete.
9937         (the_mips_linux_nat_target): New.
9938         (mips64_linux_regsets_fetch_registers)
9939         (mips64_linux_regsets_store_registers)
9940         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9941         (mips_linux_register_u_offset, mips_linux_read_description)
9942         (mips_linux_can_use_hw_breakpoint)
9943         (mips_linux_stopped_by_watchpoint)
9944         (mips_linux_stopped_data_address)
9945         (mips_linux_region_ok_for_hw_watchpoint)
9946         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9947         (mips_linux_close): Refactor as methods of mips_linux_nat.
9948         (_initialize_mips_linux_nat): Adjust to C++ification.
9949
9950         * aix-thread.c (aix_thread_target): New class.
9951         (aix_thread_ops): Now an aix_thread_target.
9952         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9953         (aix_thread_fetch_registers, aix_thread_store_registers)
9954         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9955         (aix_thread_thread_alive, aix_thread_pid_to_str)
9956         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9957         Refactor as methods of aix_thread_target.
9958         (init_aix_thread_ops): Delete.
9959         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9960         and complete_target_initialization.
9961         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9962         (rs6000_nat_target): New class.
9963         (the_rs6000_nat_target): New.
9964         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9965         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9966         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9967         (super_create_inferior): Delete.
9968         (_initialize_rs6000_nat): Adjust to C++ification.
9969
9970         * arm-linux-nat.c (arm_linux_nat_target): New class.
9971         (the_arm_linux_nat_target): New.
9972         (arm_linux_fetch_inferior_registers)
9973         (arm_linux_store_inferior_registers, arm_linux_read_description)
9974         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9975         (arm_linux_remove_hw_breakpoint)
9976         (arm_linux_region_ok_for_hw_watchpoint)
9977         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9978         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9979         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9980         arm_linux_nat_target.
9981         (_initialize_arm_linux_nat): Adjust to C++ification.
9982
9983         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9984         (the_aarch64_linux_nat_target): New.
9985         (aarch64_linux_fetch_inferior_registers)
9986         (aarch64_linux_store_inferior_registers)
9987         (aarch64_linux_child_post_startup_inferior)
9988         (aarch64_linux_read_description)
9989         (aarch64_linux_can_use_hw_breakpoint)
9990         (aarch64_linux_insert_hw_breakpoint)
9991         (aarch64_linux_remove_hw_breakpoint)
9992         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9993         (aarch64_linux_region_ok_for_hw_watchpoint)
9994         (aarch64_linux_stopped_data_address)
9995         (aarch64_linux_stopped_by_watchpoint)
9996         (aarch64_linux_watchpoint_addr_within_range)
9997         (aarch64_linux_can_do_single_step): Refactor as methods of
9998         aarch64_linux_nat_target.
9999         (super_post_startup_inferior): Delete.
10000         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10001
10002         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10003         (the_hppa_linux_nat_target): New.
10004         (hppa_linux_fetch_inferior_registers)
10005         (hppa_linux_store_inferior_registers): Refactor as methods of
10006         hppa_linux_nat_target.
10007         (_initialize_hppa_linux_nat): Adjust to C++ification.
10008
10009         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10010         (the_ia64_linux_nat_target): New.
10011         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10012         (ia64_linux_stopped_data_address)
10013         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10014         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10015         ia64_linux_nat_target methods.
10016         (super_xfer_partial): Delete.
10017         (_initialize_ia64_linux_nat): Adjust to C++ification.
10018
10019         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10020         (the_m32r_linux_nat_target): New.
10021         (m32r_linux_fetch_inferior_registers)
10022         (m32r_linux_store_inferior_registers): Refactor as
10023         m32r_linux_nat_target methods.
10024         (_initialize_m32r_linux_nat): Adjust to C++ification.
10025
10026         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10027         (the_m68k_linux_nat_target): New.
10028         (m68k_linux_fetch_inferior_registers)
10029         (m68k_linux_store_inferior_registers): Refactor as
10030         m68k_linux_nat_target methods.
10031         (_initialize_m68k_linux_nat): Adjust to C++ification.
10032
10033         * s390-linux-nat.c (s390_linux_nat_target): New class.
10034         (the_s390_linux_nat_target): New.
10035         (s390_linux_fetch_inferior_registers)
10036         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10037         (s390_insert_watchpoint, s390_remove_watchpoint)
10038         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10039         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10040         (s390_auxv_parse, s390_read_description): Refactor as methods of
10041         s390_linux_nat_target.
10042         (_initialize_s390_nat): Adjust to C++ification.
10043
10044         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10045         (the_sparc_linux_nat_target): New.
10046         (_initialize_sparc_linux_nat): Adjust to C++ification.
10047         * sparc-nat.c (sparc_fetch_inferior_registers)
10048         (sparc_store_inferior_registers): Remove target_ops parameter.
10049         * sparc-nat.h (sparc_fetch_inferior_registers)
10050         (sparc_store_inferior_registers): Remove target_ops parameter.
10051         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10052         (the_sparc64_linux_nat_target): New.
10053         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10054
10055         * spu-linux-nat.c (spu_linux_nat_target): New class.
10056         (the_spu_linux_nat_target): New.
10057         (spu_child_post_startup_inferior, spu_child_post_attach)
10058         (spu_child_wait, spu_fetch_inferior_registers)
10059         (spu_store_inferior_registers, spu_xfer_partial)
10060         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10061         methods.
10062         (_initialize_spu_nat): Adjust to C++ification.
10063
10064         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10065         (the_tilegx_linux_nat_target): New.
10066         (fetch_inferior_registers, store_inferior_registers):
10067         Refactor as methods.
10068         (_initialize_tile_linux_nat): Adjust to C++ification.
10069
10070         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10071         (the_xtensa_linux_nat_target): New.
10072         (xtensa_linux_fetch_inferior_registers)
10073         (xtensa_linux_store_inferior_registers): Refactor as
10074         xtensa_linux_nat_target methods.
10075         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10076
10077         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10078         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10079         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10080         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10081         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10082         (fbsd_stopped_by_sw_breakpoint)
10083         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10084         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10085         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10086         (fbsd_post_startup_inferior, fbsd_post_attach)
10087         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10088         (fbsd_set_syscall_catchpoint)
10089         (super_xfer_partial, super_resume, super_wait)
10090         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10091         (fbsd_handle_debug_trap): Remove target_ops parameter.
10092         (fbsd_nat_add_target): Delete.
10093         * fbsd-nat.h: Include "inf-ptrace.h".
10094         (fbsd_nat_add_target): Delete.
10095         (USE_SIGTRAP_SIGINFO): Define.
10096         (fbsd_nat_target): New class.
10097
10098         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10099         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10100         (amd64bsd_target): Delete.
10101         * amd64-bsd-nat.h: New file.
10102         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10103         "x86-bsd-nat.h".
10104         (amd64_fbsd_nat_target): New class.
10105         (the_amd64_fbsd_nat_target): New.
10106         (amd64fbsd_read_description): Refactor as method of
10107         amd64_fbsd_nat_target.
10108         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10109         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10110         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10111         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10112         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10113         (i386bsd_target): Delete.
10114         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10115         (i386bsd_fetch_inferior_registers)
10116         (i386bsd_store_inferior_registers): Declare.
10117         (i386_bsd_nat_target): New class.
10118         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10119         (the_i386_fbsd_nat_target): New.
10120         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10121         i386_fbsd_nat_target methods.
10122         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10123         (_initialize_i386fbsd_nat): Adjust to C++ification.
10124         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10125         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10126         (_initialize_x86_bsd_nat): Adjust to C++ification.
10127         * x86-bsd-nat.h: Include "x86-nat.h".
10128         (x86bsd_target): Delete declaration.
10129         (x86bsd_nat_target): New class.
10130
10131         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10132         (the_aarch64_fbsd_nat_target): New.
10133         (aarch64_fbsd_fetch_inferior_registers)
10134         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10135         aarch64_fbsd_nat_target.
10136         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10137         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10138         (the_alpha_bsd_nat_target): New.
10139         (alphabsd_fetch_inferior_registers)
10140         (alphabsd_store_inferior_registers): Refactor as
10141         alpha_bsd_nat_target methods.
10142         (_initialize_alphabsd_nat): Refactor as methods of
10143         alpha_bsd_nat_target.
10144         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10145         (the_amd64_nbsd_nat_target): New.
10146         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10147         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10148         (the_amd64_obsd_nat_target): New.
10149         (_initialize_amd64obsd_nat): Adjust to C++ification.
10150         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10151         (the_arm_fbsd_nat_target): New.
10152         (arm_fbsd_fetch_inferior_registers)
10153         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10154         (_initialize_arm_fbsd_nat): Refactor as methods of
10155         arm_fbsd_nat_target.
10156         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10157         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10158         (the_arm_netbsd_nat_target): New.
10159         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10160         arm_netbsd_nat_target.
10161         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10162         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10163         (the_hppa_nbsd_nat_target): New.
10164         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10165         hppa_nbsd_nat_target methods.
10166         (_initialize_hppanbsd_nat): Adjust to C++ification.
10167         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10168         (the_hppa_obsd_nat_target): New.
10169         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10170         methods of hppa_obsd_nat_target.
10171         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10172         add_target.
10173         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10174         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10175         add_target.
10176         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10177         (_initialize_i386obsd_nat): Use add_target.
10178         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10179         (the_m68k_bsd_nat_target): New.
10180         (m68kbsd_fetch_inferior_registers)
10181         (m68kbsd_store_inferior_registers): Refactor as methods of
10182         m68k_bsd_nat_target.
10183         (_initialize_m68kbsd_nat): Adjust to C++ification.
10184         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10185         (the_mips_fbsd_nat_target): New.
10186         (mips_fbsd_fetch_inferior_registers)
10187         (mips_fbsd_store_inferior_registers): Refactor as methods of
10188         mips_fbsd_nat_target.
10189         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10190         add_target.
10191         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10192         (the_mips_nbsd_nat_target): New.
10193         (mipsnbsd_fetch_inferior_registers)
10194         (mipsnbsd_store_inferior_registers): Refactor as methods of
10195         mips_nbsd_nat_target.
10196         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10197         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10198         (the_mips64_obsd_nat_target): New.
10199         (mips64obsd_fetch_inferior_registers)
10200         (mips64obsd_store_inferior_registers): Refactor as methods of
10201         mips64_obsd_nat_target.
10202         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10203         add_target.
10204         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10205         nbsd_nat_target.
10206         * nbsd-nat.h: Include "inf-ptrace.h".
10207         (nbsd_nat_target): New class.
10208         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10209         (obsd_wait): Refactor as methods of obsd_nat_target.
10210         (obsd_add_target): Delete.
10211         * obsd-nat.h: Include "inf-ptrace.h".
10212         (obsd_nat_target): New class.
10213         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10214         (the_ppc_fbsd_nat_target): New.
10215         (ppcfbsd_fetch_inferior_registers)
10216         (ppcfbsd_store_inferior_registers): Refactor as methods of
10217         ppc_fbsd_nat_target.
10218         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10219         add_target.
10220         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10221         (the_ppc_nbsd_nat_target): New.
10222         (ppcnbsd_fetch_inferior_registers)
10223         (ppcnbsd_store_inferior_registers): Refactor as methods of
10224         ppc_nbsd_nat_target.
10225         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10226         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10227         (the_ppc_obsd_nat_target): New.
10228         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10229         methods of ppc_obsd_nat_target.
10230         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10231         add_target.
10232         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10233         (the_sh_nbsd_nat_target): New.
10234         (shnbsd_fetch_inferior_registers)
10235         (shnbsd_store_inferior_registers): Refactor as methods of
10236         sh_nbsd_nat_target.
10237         (_initialize_shnbsd_nat): Adjust to C++ification.
10238         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10239         (inf_ptrace_xfer_partial): Delete.
10240         (sparc_xfer_partial, sparc_target): Delete.
10241         * sparc-nat.h (sparc_fetch_inferior_registers)
10242         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10243         (sparc_target): Delete function declaration.
10244         (sparc_target): New template class.
10245         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10246         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10247         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10248         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10249         add_target.
10250         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10251         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10252         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10253         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10254         add_target.
10255         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10256         (the_vax_bsd_nat_target): New.
10257         (vaxbsd_fetch_inferior_registers)
10258         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10259         methods.
10260         (_initialize_vaxbsd_nat): Adjust to C++ification.
10261
10262         * bsd-kvm.c (bsd_kvm_target): New class.
10263         (bsd_kvm_ops): Now a bsd_kvm_target.
10264         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10265         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10266         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10267         bsd_kvm_target.
10268         (bsd_kvm_return_one): Delete.
10269         (bsd_kvm_add_target): Adjust to C++ification.
10270
10271         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10272         (nto_procfs_target_procfs): New classes.
10273         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10274         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10275         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10276         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10277         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10278         (procfs_remove_hw_breakpoint, procfs_resume)
10279         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10280         (procfs_kill_inferior, procfs_store_registers)
10281         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10282         as methods of nto_procfs_target.
10283         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10284         (nto_native_ops): Delete.
10285         (procfs_open, procfs_native_open): Delete.
10286         (nto_native_ops): Now an nto_procfs_target_native.
10287         (init_procfs_targets): Adjust to C++ification.
10288         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10289         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10290         Refactor as methods of nto_procfs_target.
10291
10292         * go32-nat.c (go32_nat_target): New class.
10293         (the_go32_nat_target): New.
10294         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10295         (go32_store_registers, go32_xfer_partial, go32_files_info)
10296         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10297         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10298         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10299         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10300         (go32_target): Delete.
10301         (_initialize_go32_nat): Adjust to C++ification.
10302
10303         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10304         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10305         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10306         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10307         gnu_nat_target.
10308         (gnu_target): Delete.
10309         * gnu-nat.h (gnu_target): Delete.
10310         (gnu_nat_target): New class.
10311         * i386-gnu-nat.c (gnu_base_target): New.
10312         (i386_gnu_nat_target): New class.
10313         (the_i386_gnu_nat_target): New.
10314         (_initialize_i386gnu_nat): Adjust to C++ification.
10315
10316 2018-05-02  Pedro Alves  <palves@redhat.com>
10317
10318         * bfd-target.c (target_bfd_xclose): Rename to ...
10319         (target_bfd_close): ... this.
10320         (target_bfd_reopen): Adjust.
10321         * target.c (target_close): Remove references to to_xclose.
10322         * target.h (target_ops::to_xclose): Delete.
10323         (target_ops::to_close): Update comments.
10324
10325 2018-05-02  Pedro Alves  <palves@redhat.com>
10326
10327         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10328         "linux-nat.h".
10329         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10330         * inf-ptrace.c (inf_ptrace_register_u_offset)
10331         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10332         (inf_ptrace_store_register, inf_ptrace_store_registers)
10333         (inf_ptrace_trad_target): Move to ...
10334         * linux-nat-trad.c: ... this new file.
10335         * linux-nat-trad.h: New file.
10336         * linux-nat.c (linux_target_install_ops): Make extern.
10337         (linux_trad_target): Delete.
10338         * linux-nat.h (linux_trad_target): Delete declaration.
10339         (linux_target_install_ops): Declare.
10340         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10341         "linux-nat.h".
10342
10343 2018-05-02  Pedro Alves  <palves@redhat.com>
10344
10345         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10346         procfs_target/add_target here.
10347         * procfs.c (procfs_target): Make static.
10348         (_initialize_procfs): Call add_target here.
10349         * procfs.h (struct target_ops): Remove forward declaration.
10350         (procfs_target): Remove declaration.
10351         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10352
10353 2018-05-02  Pedro Alves  <palves@redhat.com>
10354
10355         * procfs.c (procfs_stopped_by_watchpoint)
10356         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10357         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10358         Forward declare.
10359         (procfs_use_watchpoints): Delete, move contents...
10360         (procfs_target): ... here.
10361         * procfs.h (procfs_use_watchpoints): Delete declaration.
10362         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10363         procfs_use_watchpoints.
10364         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10365         procfs_use_watchpoints.
10366
10367 2018-05-02  Tom Tromey  <tom@tromey.com>
10368
10369         PR python/20084:
10370         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10371         and var_zuinteger_unlimited.
10372         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10373         and PARAM_ZUINTEGER_UNLIMITED.
10374         (set_parameter_value): Handle var_zuinteger and
10375         var_zuinteger_unlimited.
10376         (add_setshow_generic): Likewise.
10377         (parmpy_init): Likewise.
10378
10379 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10380
10381         PR rust/23124
10382         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10383         pointer is not null before dereferencing it.
10384
10385 2018-04-30  Tom Tromey  <tom@tromey.com>
10386
10387         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10388         is_mi_like_p.
10389
10390 2018-04-30  Tom Tromey  <tom@tromey.com>
10391
10392         * breakpoint.c (mention): Remove use of is_mi_like_p.
10393         (print_mention_ranged_breakpoint): Likewise.
10394         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10395         of is_mi_like_p.
10396
10397 2018-04-30  Tom Tromey  <tom@tromey.com>
10398
10399         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10400
10401 2018-04-30  Tom Tromey  <tom@tromey.com>
10402
10403         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10404         (info_spu_event_command): Remove some uses of is_mi_like_p.
10405
10406 2018-04-30  Tom Tromey  <tom@tromey.com>
10407
10408         * python/py-framefilter.c (py_print_single_arg)
10409         (enumerate_locals, py_print_args, py_print_frame): Remove some
10410         uses of is_mi_like_p.
10411
10412 2018-04-30  Tom Tromey  <tom@tromey.com>
10413
10414         * ui-out.c: Update.
10415         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10416         * ui-out.h (ui_out::is_mi_like_p): Now const.
10417         (ui_out::do_is_mi_like_p): Now const.
10418         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10419
10420 2018-04-30  Tom Tromey  <tom@tromey.com>
10421
10422         * varobj.c (varobj_set_visualizer): Use new_reference.
10423         * python/python.c (gdbpy_decode_line): Use new_reference.
10424         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10425         new_reference.
10426
10427 2018-04-30  Tom Tromey  <tom@tromey.com>
10428
10429         * varobj.c (install_new_value): Use new_reference.
10430         * value.h (value_incref): Return void.  Swap intro comment with
10431         value_decref.
10432         * value.c (set_value_parent): Use new_reference.
10433         (value_incref): Return void.  Update intro comment.
10434         (release_value): Use new_reference.
10435         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10436
10437 2018-04-30  Tom Tromey  <tom@tromey.com>
10438
10439         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10440         * gdb_bfd.h (new_bfd_ref): Remove.
10441         (gdb_bfd_open): Update comment.
10442         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10443         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10444         (gdb_bfd_fdopenr): Use new_reference.
10445         * exec.c (exec_file_attach): Use new_reference.
10446
10447 2018-04-30  Tom Tromey  <tom@tromey.com>
10448
10449         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10450         method.
10451
10452 2018-04-30  Tom Tromey  <tom@tromey.com>
10453
10454         * jit.c (jit_read_code_entry): Use type_align.
10455         * i386-tdep.c (i386_gdbarch_init): Don't call
10456         set_gdbarch_long_long_align_bit.
10457         * gdbarch.sh: Remove long_long_align_bit.
10458         * gdbarch.c, gdbarch.h: Rebuild.
10459         * arc-tdep.c (arc_type_align): New function.
10460         (arc_gdbarch_init): Use arc_type_align.  Don't call
10461         set_gdbarch_long_long_align_bit.
10462
10463 2018-04-30  Tom Tromey  <tom@tromey.com>
10464
10465         * rust-lang.c (rust_type_alignment): Remove.
10466         (rust_composite_type): Use type_align.
10467
10468 2018-04-30  Tom Tromey  <tom@tromey.com>
10469
10470         * NEWS: Mention Type.align.
10471         * python/py-type.c (typy_get_alignof): New function.
10472         (type_object_getset): Add "alignof".
10473
10474 2018-04-30  Tom Tromey  <tom@tromey.com>
10475
10476         PR exp/17095:
10477         * NEWS: Update.
10478         * std-operator.def (UNOP_ALIGNOF): New operator.
10479         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10480         New.
10481         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10482         * c-lang.c (c_op_print_tab): Add alignof.
10483         * c-exp.y (ALIGNOF): New token.
10484         (exp): Add "ALIGNOF" production.
10485         (ident_tokens): Add _Alignof and alignof.
10486
10487 2018-04-30  Tom Tromey  <tom@tromey.com>
10488
10489         * i386-tdep.c (i386_type_align): New function.
10490         (i386_gdbarch_init): Update.
10491         * gdbarch.sh (type_align): New method.
10492         * gdbarch.c, gdbarch.h: Rebuild.
10493         * arch-utils.h (default_type_align): Declare.
10494         * arch-utils.c (default_type_align): New function.
10495         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10496         (struct type) <align_log2>: New field.
10497         <instance_flags>: Now a bitfield.
10498         (TYPE_RAW_ALIGN): New macro.
10499         (type_align, type_raw_align, set_type_align): Declare.
10500         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10501         functions.
10502         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10503         (get_alignment, maybe_set_alignment): New functions.
10504         (read_structure_type, read_enumeration_type, read_array_type)
10505         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10506         (read_subrange_type, read_base_type): Set type alignment.
10507
10508 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10509
10510         * dwarf2read.c (read_index_from_section): Use bool.
10511
10512 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10513
10514         PR gdb/22950
10515         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10516         with #ifdef.
10517
10518 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10519
10520         PR build/22873
10521         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10522         last step, and do it atomically.
10523
10524 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10525
10526         * compile/compile-c-types.c (convert_int, convert_float):
10527         Update for C FE v1.
10528
10529 2018-04-27  Tom Tromey  <tom@tromey.com>
10530
10531         PR rust/22545:
10532         * rust-lang.c (rust_inclusive_range_type_p): New function.
10533         (rust_range): Handle inclusive ranges.
10534         (rust_compute_range): Likewise.
10535         * rust-exp.y (struct rust_op) <inclusive>: New field.
10536         (DOTDOTEQ): New constant.
10537         (range_expr): Add "..=" productions.
10538         (operator_tokens): Add "..=" token.
10539         (ast_range): Add "inclusive" parameter.
10540         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10541         ranges.
10542         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10543         bounds values.
10544         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10545         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10546         Update comments.
10547         * expprint.c (print_subexp_standard): Handle new bounds values.
10548         (dump_subexp_body_standard): Likewise.
10549
10550 2018-04-27  Tom Tromey  <tom@tromey.com>
10551
10552         * configure: Rebuild.
10553         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10554         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10555         "OVERRIDE".
10556         (class symbol_needs_eval_context): Likewise.
10557         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10558         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10559         "virtual".
10560         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10561         "override".
10562         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10563         * aarch64-tdep.c (instruction_reader::read): Use "override".
10564         (instruction_reader_test::read): Likewise.
10565         * arm-tdep.c (instruction_reader::read): Use "override".
10566         (instruction_reader_thumb::read): Likewise.
10567
10568 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10569
10570         PR remote/9665
10571         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10572         instead of remote_send.
10573         (remote_send): Remove.
10574
10575 2018-04-26  Pedro Alves  <palves@redhat.com>
10576
10577         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10578         find_function_start_sal instead of find_pc_line.
10579
10580 2018-04-26  Pedro Alves  <palves@redhat.com>
10581
10582         * breakpoint.c (set_breakpoint_location_function): Handle
10583         mst_data_gnu_ifunc.
10584         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10585         * elfread.c (elf_symtab_read): Give data symbols with
10586         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10587         (elf_rel_plt_read): Update comment.
10588         * linespec.c (convert_linespec_to_sals): Handle
10589         mst_data_gnu_ifunc.
10590         (minsym_found): Handle mst_data_gnu_ifunc.
10591         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10592         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10593         * parse.c (find_minsym_type_and_address): Handle
10594         mst_data_gnu_ifunc.
10595         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10596         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10597         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10598         comment.
10599         <mst_data_gnu_ifunc>: New enumerator.
10600
10601 2018-04-26  Pedro Alves  <palves@redhat.com>
10602
10603         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10604         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10605         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10606         Handle it.
10607         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10608         (lookup_minimal_symbol_by_pc): Adjust.
10609         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10610         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10611         * minsyms.h (lookup_msym_prefer): New enum.
10612         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10613         parameter by a lookup_msym_prefer parameter.
10614
10615 2018-04-26  Pedro Alves  <palves@redhat.com>
10616
10617         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10618         ends in "@plt" instead of looking at the symbol's section.
10619
10620 2018-04-26  Pedro Alves  <palves@redhat.com>
10621
10622         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10623         all references.
10624         (find_pc_partial_function_gnu_ifunc): Rename to ...
10625         (find_pc_partial_function): ... this, and remove references to
10626         'is_gnu_ifunc_p'.
10627         (find_pc_partial_function): Delete old implementation.
10628         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10629
10630 2018-04-26  Pedro Alves  <palves@redhat.com>
10631
10632         * linespec.c (struct bound_minimal_symbol_search_key): New.
10633         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10634         skip first line if we found a GNU ifunc minimal symbol by name.
10635         (compare_msymbols): Change parameters to work with a destructured
10636         lhs minsym.
10637         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10638         functions.
10639
10640 2018-04-26  Pedro Alves  <palves@redhat.com>
10641
10642         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10643         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10644         address/name.
10645         (add_location_to_breakpoint): Store the minsym and the objfile in
10646         the breakpoint location.
10647         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10648         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10649         Record the minsym in the sal.
10650         * symtab.h (symtab_and_line) <msymbol>: New field.
10651
10652 2018-04-26  Pedro Alves  <palves@redhat.com>
10653
10654         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10655         unless we actually resolved the ifunc.
10656
10657 2018-04-26  Pedro Alves  <palves@redhat.com>
10658
10659         * c-exp.y (variable production): Prefer ifunc minsyms over
10660         regular function symbols.
10661         * symtab.c (find_gnu_ifunc): New function.
10662         * minsyms.h (lookup_msym_prefer): New enum.
10663         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10664         parameter by a lookup_msym_prefer parameter.
10665         * symtab.h (find_gnu_ifunc): New declaration.
10666
10667 2018-04-26  Pedro Alves  <palves@redhat.com>
10668
10669         * blockframe.c (find_gnu_ifunc_target_type): New function.
10670         (find_function_type): New.
10671         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10672         return a value with a memory address.
10673         (eval_call): For calls to GNU ifunc functions, try to find the
10674         type of the target function from the type that the resolver
10675         returns.
10676         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10677         symbols.
10678         * infcall.c (find_function_return_type): Delete.
10679         (find_function_addr): Add 'function_type' parameter.  For calls to
10680         GNU ifunc functions, try to find the type of the target function
10681         from the type that the resolver returns, and return it via
10682         FUNCTION_TYPE.
10683         (call_function_by_hand_dummy): Adjust to use the function type
10684         returned by find_function_addr.
10685         (find_function_addr): Add 'function_type' parameter and move
10686         description here.
10687         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10688         declarations.
10689
10690 2018-04-26  Pedro Alves  <palves@redhat.com>
10691
10692         * c-exp.y (variable production): Skip finding an alias for ifunc
10693         symbols.
10694
10695 2018-04-26  Pedro Alves  <palves@redhat.com>
10696
10697         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10698
10699 2018-04-25  Pedro Alves  <palves@redhat.com>
10700
10701         * infcmd.c (kill_command): Print the pid as string, not the whole
10702         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10703         message.
10704         * remote.c (remote_detach_1): Print the pid as string, not the
10705         whole thread's ptid.
10706
10707 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10708             Sergio Durigan Junior  <sergiodj@redhat.com>
10709             Pedro Alves  <palves@redhat.com>
10710
10711         * infcmd.c (kill_command): Print message when inferior has
10712         been killed.
10713         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10714         '1'.
10715         (add_inferior): Improve message printed when
10716         'print_inferior_events' is on.
10717         (exit_inferior): Remove message printed when
10718         'print_inferior_events' is on.
10719         (detach_inferior): Improve message printed when
10720         'print_inferior_events' is on.
10721         (initialize_inferiors): Use 'add_inferior_silent' to set
10722         'current_inferior_'.
10723         * inferior.h (print_inferior_events): Declare here as
10724         'extern'.
10725         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10726         '[Detaching...]' messages when 'print_inferior_events' is on.
10727         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10728         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10729         'Detaching after fork from child...', replace it by '... from
10730         parent...'.
10731         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10732         prefix/suffix when printing 'Detaching...' messages.  Print
10733         them when 'print_inferior_events' is on.
10734         * remote.c (remote_detach_1): Print message when detaching
10735         from inferior and '!is_fork_parent'.
10736
10737 2018-04-24  Tom Tromey  <tom@tromey.com>
10738
10739         * cli-out.h: Reindent.
10740
10741 2018-04-24  Tom Tromey  <tom@tromey.com>
10742
10743         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10744         (cli_ui_out::do_field_string): Use fputs_filtered.
10745         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10746
10747 2018-04-23  Tom Tromey  <tom@tromey.com>
10748
10749         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10750         gdb::unique_xmalloc_ptr.
10751
10752 2018-04-23  Tom Tromey  <tom@tromey.com>
10753
10754         * configure: Rebuild.
10755
10756 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10757
10758         PR gdb/23095
10759         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10760         prepare_for_testing.  Set normal_bp to r_debug_state if target
10761         is bsd.
10762
10763 2018-04-21  Pedro Alves  <palves@redhat.com>
10764             Rajendra SY  <rajendra.sy@gmail.com>
10765
10766         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10767         * remote.c (extended_remote_attach): In all-stop mode, mark the
10768         thread as executing.
10769
10770 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10771
10772         * thread.c (thread_apply_all_command): Fix comment.
10773         (thread_command): Fix comment.
10774
10775 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10776
10777         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10778         parameter.
10779         * features/aarch64-core.c (create_feature_aarch64_core):
10780         Regenerate.
10781         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10782         Likewise.
10783         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10784         Likewise.
10785         * features/i386/32bit-avx512.c
10786         (create_feature_i386_32bit_avx512): Likewise.
10787         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10788         Likewise.
10789         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10790         Likewise.
10791         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10792         Likewise.
10793         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10794         Likewise.
10795         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10796         Likewise.
10797         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10798         Likewise.
10799         * features/i386/64bit-avx512.c
10800         (create_feature_i386_64bit_avx512): Likewise.
10801         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10802         Likewise.
10803         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10804         Likewise.
10805         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10806         Likewise.
10807         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10808         Likewise.
10809         * features/i386/64bit-segments.c
10810         (create_feature_i386_64bit_segments): Likewise.
10811         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10812         Likewise.
10813         * features/i386/x32-core.c
10814         (create_feature_i386_x32_core): Likewise.
10815         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10816         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10817         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10818         * target-descriptions.c: In generated code, don't pass xml
10819         filename.
10820
10821 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10822
10823         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10824         (print_xml_feature::visit_post): Likewise.
10825         (print_xml_feature::visit): Likewise.
10826         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10827         (print_xml_feature): Add new class.
10828         * regformats/regdat.sh: Null xmltarget on feature targets.
10829         * target-descriptions.c (struct target_desc): Add xmltarget.
10830         (maintenance_check_tdesc_xml_convert): Add unittest function.
10831         (tdesc_get_features_xml): Add function to get xml.
10832         (maintenance_check_xml_descriptions): Test xml generation.
10833         * xml-tdesc.c (string_read_description_xml): Add function.
10834         * xml-tdesc.h (string_read_description_xml): Add declaration.
10835
10836 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10837
10838         * features/Makefile: Add feature marker to targets with new style
10839         target descriptions.
10840         * regformats/aarch64.dat: Regenerate.
10841         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10842         * regformats/i386/amd64-avx-linux.dat: Likewise.
10843         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10844         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10845         * regformats/i386/amd64-linux.dat: Likewise.
10846         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10847         * regformats/i386/amd64.dat: Likewise.
10848         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10849         * regformats/i386/i386-avx-linux.dat: Likewise.
10850         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10851         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10852         * regformats/i386/i386-linux.dat: Likewise.
10853         * regformats/i386/i386-mmx-linux.dat: Likewise.
10854         * regformats/i386/i386-mpx-linux.dat: Likewise.
10855         * regformats/i386/i386.dat: Likewise.
10856         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10857         * regformats/i386/x32-avx-linux.dat: Likewise.
10858         * regformats/i386/x32-linux.dat: Likewise.
10859         * regformats/tic6x-c62x-linux.dat: Likewise.
10860         * regformats/tic6x-c64x-linux.dat: Likewise.
10861         * regformats/tic6x-c64xp-linux.dat: Likewise.
10862         * regformats/regdat.sh: Parse feature marker.
10863
10864 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10865
10866         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10867         (tdesc_osabi_name): Likewise.
10868         * target-descriptions.c (tdesc_architecture_name): Add new
10869         function.
10870         (tdesc_osabi_name): Likewise.
10871
10872 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10873
10874         * common/tdesc.c (tdesc_predefined_type): Move to here.
10875         (tdesc_named_type): Likewise.
10876         (tdesc_create_vector): Likewise.
10877         (tdesc_create_struct): Likewise.
10878         (tdesc_set_struct_size): Likewise.
10879         (tdesc_create_union): Likewise.
10880         (tdesc_create_flags): Likewise.
10881         (tdesc_create_enum): Likewise.
10882         (tdesc_add_field): Likewise.
10883         (tdesc_add_typed_bitfield): Likewise.
10884         (tdesc_add_bitfield): Likewise.
10885         (tdesc_add_flag): Likewise.
10886         (tdesc_add_enum_value): Likewise.
10887         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10888         (struct tdesc_type_vector): Likewise.
10889         (struct tdesc_type_field): Likewise.
10890         (struct tdesc_type_with_fields): Likewise.
10891         (tdesc_create_enum): Add declaration.
10892         (tdesc_add_typed_bitfield): Likewise.
10893         (tdesc_add_enum_value): Likewise.
10894         * target-descriptions.c (tdesc_type_field): Move from here.
10895         (tdesc_type_builtin): Likewise.
10896         (tdesc_type_vector): Likewise.
10897         (tdesc_type_with_fields): Likewise.
10898         (tdesc_predefined_types): Likewise.
10899         (tdesc_named_type): Likewise.
10900         (tdesc_create_vector): Likewise.
10901         (tdesc_create_struct): Likewise.
10902         (tdesc_set_struct_size): Likewise.
10903         (tdesc_create_union): Likewise.
10904         (tdesc_create_flags): Likewise.
10905         (tdesc_create_enum): Likewise.
10906         (tdesc_add_field): Likewise.
10907         (tdesc_add_typed_bitfield): Likewise.
10908         (tdesc_add_bitfield): Likewise.
10909         (tdesc_add_flag): Likewise.
10910         (tdesc_add_enum_value): Likewise.
10911         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10912         (tdesc_add_typed_bitfield): Likewise.
10913         (tdesc_add_enum_value): Likewise.
10914
10915 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10916
10917         * common/tdesc.c (tdesc_feature::accept): Move to here.
10918         (tdesc_feature::operator==): Likewise.
10919         (tdesc_create_reg): Likewise.
10920         * common/tdesc.h (tdesc_type_kind): Likewise.
10921         (struct tdesc_type): Likewise.
10922         (struct tdesc_feature): Likewise.
10923         * regformats/regdat.sh: Create a feature.
10924         * target-descriptions.c (tdesc_type_kind): Move from here.
10925         (tdesc_type): Likewise.
10926         (tdesc_type_up): Likewise.
10927         (tdesc_feature): Likewise.
10928         (tdesc_create_reg): Likewise.
10929
10930 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10931
10932         * Makefile.in: Add arch/tdesc.c
10933         * common/tdesc.c: New file.
10934         * common/tdesc.h (tdesc_element_visitor): Move to here.
10935         (tdesc_element): Likewise.
10936         (tdesc_reg): Likewise.
10937         (tdesc_reg_up): Likewise.
10938         * regformats/regdef.h (reg): Add offset to constructors.
10939         * target-descriptions.c (tdesc_element_visitor): Move from here.
10940         (tdesc_element): Likewise.
10941         (tdesc_reg): Likewise.
10942         (tdesc_reg_up): Likewise.
10943
10944 2018-04-17  Tom Tromey  <tom@tromey.com>
10945
10946         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10947         discriminant field.
10948
10949 2018-04-17  Tom Tromey  <tom@tromey.com>
10950
10951         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10952
10953 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10954
10955         * symtab.c (print_symbol_info): Skip printing filename and line
10956         number when `last' is NULL.
10957         (symtab_symbol_info): Use empty string instead of NULL for first
10958         invocation of print_symbol_info.
10959         (rbreak_command): Pass NULL to `last' parameter of
10960         print_symbol_info.
10961
10962 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10963
10964         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10965         instead of nullptr.
10966
10967 2018-04-16  Pedro Alves  <palves@redhat.com>
10968
10969         * MAINTAINERS (sh): Remove.
10970         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10971         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10972         (ALLDEPFILES): Remove sh64-tdep.c.
10973         * NEWS: Mentions that support for SH-5/SH64 is removed.
10974         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10975         (sh*-*-openbsd*): Ditto.
10976         (sh64-*-elf*): Remove.
10977         (sh*): Remove.
10978         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10979         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10980         * sh-tdep.c: No longer include "sh64-tdep.h".
10981         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10982         * sh64-tdep.c, sh64-tdep.h: Remove files.
10983
10984 2018-04-16  Pedro Alves  <palves@redhat.com>
10985
10986         * MAINTAINERS: Remove m88k.
10987         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10988         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10989         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10990         * NEWS: Mention that support for m88k was removed.
10991         * configure.host (m88*-*-*): Remove support.
10992         * configure.nat (m88k-*-*): Remove support.
10993         * configure.tgt (m88*-*-openbsd*): Remove.
10994         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10995
10996 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10997
10998         * configure.tgt (x86_tobjs): New variable.
10999         (amd64_tobjs, i386_tobjs): Use it.
11000
11001 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11002
11003         * symtab.c (print_symbol_info): Precede the symbol definition by
11004         the line number when available.
11005         * NEWS: Advertise this enhancement.
11006
11007 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11008
11009         * NEWS (New options): announce set/show record btrace cpu.
11010         * btrace.c: Include record-btrace.h.
11011         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11012         the vendor is unknown.
11013         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11014         Maybe overwrite the btrace configuration's cpu.
11015         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11016         (btrace_fetch): Add cpu parameter.  Update callers.
11017         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11018         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11019         errata workarounds if the vendor is unknown.
11020         * python/py-record-btrace.c: Include record-btrace.h.
11021         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11022         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11023         * record-btrace.c (record_btrace_cpu_state_kind): New.
11024         (record_btrace_cpu): New.
11025         (set_record_btrace_cpu_cmdlist): New.
11026         (record_btrace_get_cpu): New.
11027         (require_btrace_thread, record_btrace_info)
11028         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11029         (cmd_set_record_btrace_cpu_none): New.
11030         (cmd_set_record_btrace_cpu_auto): New.
11031         (cmd_set_record_btrace_cpu): New.
11032         (cmd_show_record_btrace_cpu): New.
11033         (_initialize_record_btrace): Initialize set/show record btrace cpu
11034         commands.
11035         * record-btrace.h (record_btrace_get_cpu): New.
11036
11037 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11038
11039         * record.c (set_record_command): Fix typo in message.
11040
11041 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11042
11043         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11044
11045 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11046
11047         * infrun.c (process_event_stop_test): Call
11048         gdbarch_in_indirect_branch_thunk.
11049         * gdbarch.sh (in_indirect_branch_thunk): New.
11050         * gdbarch.c: Regenerated.
11051         * gdbarch.h: Regenerated.
11052         * x86-tdep.h: New.
11053         * x86-tdep.c: New.
11054         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11055         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11056         (ALLDEPFILES): Add x86-tdep.c.
11057         * arch-utils.h (default_in_indirect_branch_thunk): New.
11058         * arch-utils.c (default_in_indirect_branch_thunk): New.
11059         * i386-tdep: Include x86-tdep.h.
11060         (i386_in_indirect_branch_thunk): New.
11061         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11062         function.
11063         * amd64-tdep: Include x86-tdep.h.
11064         (amd64_in_indirect_branch_thunk): New.
11065         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11066
11067 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11068
11069         PR gdb/23053
11070         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11071         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11072         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11073         regression.
11074
11075 2018-04-12  Tom Tromey  <tom@tromey.com>
11076
11077         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11078         (rust_evaluate_subexp): Likewise.
11079
11080 2018-04-12  Pedro Alves  <palves@redhat.com>
11081
11082         * procfs.c (procfs_detach): Make forward declaration's prototype
11083         match definition's protototype.
11084         (proc_get_LDT_entry): Remove stale do_cleanups call.
11085
11086 2018-04-12  Pedro Alves  <palves@redhat.com>
11087
11088         * target.h (target_ops::to_has_exited): Delete.
11089         (target_has_exited): Delete.
11090         * target-delegates.c: Regenerate.
11091
11092 2018-04-11  Pedro Alves  <palves@redhat.com>
11093
11094         * target.c (fileio_fh_t::t): Add comment.
11095         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11096         (target_fileio_close): Handle a NULL target.
11097         (invalidate_fileio_fh): New.
11098         (target_close): Call it.
11099         * remote.c (remote_hostio_send_command): No longer check whether
11100         remote_desc is open.
11101
11102 2018-04-11  Pedro Alves  <palves@redhat.com>
11103
11104         * target.c (fileio_fh_t): Make it a named struct instead of a
11105         typedef.
11106         (fileio_fh_t::is_closed): New method.
11107         (DEF_VEC_O (fileio_fh_t)): Remove.
11108         (fileio_fhandles): Now a std::vector.
11109         (is_closed_fileio_fh): Delete.
11110         (acquire_fileio_fd): Adjust.  Rename parameters.
11111         (release_fileio_fd): Adjust.
11112         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11113         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11114         (target_fileio_close): Adjust.
11115
11116 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11117
11118         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11119         index.
11120
11121 2018-04-10  Pedro Alves  <palves@redhat.com>
11122
11123         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11124         (scoped_finish_thread_state): New class.
11125         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11126         cleanup.
11127         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11128         (fetch_inferior_event, normal_stop): Likewise.
11129         * thread.c (finish_thread_state_cleanup): Delete.
11130
11131 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11132             Pedro Alves  <palves@redhat.com>
11133
11134         * value.c: Include "selftest.h" and "common/array-view.h".
11135         (struct range) <operator ==>: New.
11136         (test_ranges_contain): New.
11137         (check_ranges_vector): New.
11138         (test_insert_into_bit_range_vector): New.
11139         (_initialize_values): Register selftests.
11140         * common/array-view.h (operator==, operator!=): New.
11141
11142 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11143
11144         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11145         an iterator.
11146         * inline-frame.c: Include <algorithm>.
11147         (struct inline_state): Add constructor.
11148         (inline_state_s): Remove.
11149         (DEF_VEC_O(inline_state_s)): Remove.
11150         (inline_states): Change type to std::vector.
11151         (find_inline_frame_state): Adjust to std::vector.
11152         (allocate_inline_frame_state): Remove.
11153         (clear_inline_frame_state): Adjust to std::vector.
11154         (skip_inline_frames): Adjust to std::vector.
11155
11156 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11157
11158         * tracepoint.h (struct trace_state_variable): Add constructor.
11159         <name>: Change type to std::string.
11160         * tracepoint.c (tsv_s): Remove.
11161         (DEF_VEC_O(tsv_s)): Remove.
11162         (tvariables): Change to std::vector.
11163         (create_trace_state_variable): Adjust to std::vector.
11164         (find_trace_state_variable): Likewise.
11165         (find_trace_state_variable_by_number): Likewise.
11166         (delete_trace_state_variable): Likewise.
11167         (trace_variable_command): Adjust to std::string.
11168         (delete_trace_variable_command): Likewise.
11169         (tvariables_info_1): Adjust to std::vector.
11170         (save_trace_state_variables): Likewise.
11171         (start_tracing): Likewise.
11172         (merge_uploaded_trace_state_variables): Adjust to std::vector
11173         and std::string.
11174         * target.h (struct target_ops)
11175         <to_download_trace_state_variable>: Pass reference to
11176         trace_state_variable.
11177         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11178         * target-delegates.c: Re-generate.
11179         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11180         (mi_tsv_deleted): Likewise.
11181         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11182         * remote.c (remote_download_trace_state_variable): Change
11183         pointer to reference and adjust.
11184         * make-target-delegates (parse_argtypes): Handle references.
11185         (write_function_header): Likewise.
11186         (munge_type): Likewise.
11187
11188 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11189
11190         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11191         string_view-selftests.c.
11192         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11193         testsuite.
11194         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11195         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11196         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11197         * unittests/basic_string_view/element_access/char/1.cc:
11198         Likewise.
11199         * unittests/basic_string_view/element_access/char/empty.cc:
11200         Likewise.
11201         * unittests/basic_string_view/element_access/char/front_back.cc:
11202         Likewise.
11203         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11204         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11205         Likewise.
11206         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11207         Likewise.
11208         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11209         Likewise.
11210         * unittests/basic_string_view/operations/compare/char/1.cc:
11211         Likewise.
11212         * unittests/basic_string_view/operations/compare/char/13650.cc:
11213         Likewise.
11214         * unittests/basic_string_view/operations/copy/char/1.cc:
11215         Likewise.
11216         * unittests/basic_string_view/operations/data/char/1.cc:
11217         Likewise.
11218         * unittests/basic_string_view/operations/find/char/1.cc:
11219         Likewise.
11220         * unittests/basic_string_view/operations/find/char/2.cc:
11221         Likewise.
11222         * unittests/basic_string_view/operations/find/char/3.cc:
11223         Likewise.
11224         * unittests/basic_string_view/operations/find/char/4.cc:
11225         Likewise.
11226         * unittests/basic_string_view/operations/rfind/char/1.cc:
11227         Likewise.
11228         * unittests/basic_string_view/operations/rfind/char/2.cc:
11229         Likewise.
11230         * unittests/basic_string_view/operations/rfind/char/3.cc:
11231         Likewise.
11232         * unittests/basic_string_view/operations/substr/char/1.cc:
11233         Likewise.
11234         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11235         * unittests/string_view-selftests.c: New file.
11236
11237 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11238
11239         * unittests/basic_string_view/capacity/1.cc: New file.
11240         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11241         * unittests/basic_string_view/cons/char/1.cc: New file.
11242         * unittests/basic_string_view/cons/char/2.cc: New file.
11243         * unittests/basic_string_view/cons/char/3.cc: New file.
11244         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11245         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11246         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11247         * unittests/basic_string_view/element_access/char/1.cc: New file.
11248         * unittests/basic_string_view/element_access/char/2.cc: New file.
11249         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11250         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11251         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11252         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11253         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11254         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11255         * unittests/basic_string_view/include.cc: New file.
11256         * unittests/basic_string_view/inserters/char/1.cc: New file.
11257         * unittests/basic_string_view/inserters/char/2.cc: New file.
11258         * unittests/basic_string_view/inserters/char/3.cc: New file.
11259         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11260         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11261         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11262         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11263         * unittests/basic_string_view/literals/types.cc: New file.
11264         * unittests/basic_string_view/literals/values.cc: New file.
11265         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11266         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11267         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11268         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11269         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11270         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11271         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11272         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11273         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11274         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11275         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11276         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11277         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11278         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11279         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11280         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11281         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11282         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11283         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11284         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11285         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11286         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11287         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11288         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11289         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11290         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11291         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11292         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11293         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11294         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11295         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11296         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11297         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11298         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11299         * unittests/basic_string_view/operators/char/2.cc: New file.
11300         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11301         * unittests/basic_string_view/range_access/char/1.cc: New file.
11302         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11303         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11304         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11305         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11306         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11307         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11308         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11309         * unittests/basic_string_view/typedefs.cc: New file.
11310         * unittests/basic_string_view/types/1.cc: New file.
11311
11312 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11313
11314         * common/gdb_string_view.h: Remove libstdc++ implementation
11315         details, adjust to gdb reality.
11316         * common/gdb_string_view.tcc: Likewise.
11317         * cli/cli-script.c (struct string_view): Remove.
11318         (user_args) <m_args>: Change element type to gdb::string_view.
11319         (user_args::insert_args): Adjust.
11320
11321 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11322
11323         * common/gdb_string_view.h: New file.
11324         * common/gdb_string_view.tcc: New file.
11325
11326 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11327
11328         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11329         * configure: Re-generate.
11330
11331 2018-04-09  Pedro Alves  <palves@redhat.com>
11332
11333         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11334         (set_target_gdbarch): Call
11335         gdb::observers::architecture_changed.notify instead of
11336         observer_notify_architecture_changed.
11337
11338 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11339
11340         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11341         (do_restore_current_traceframe_cleanup): Remove.
11342         (restore_current_traceframe_cleanup_dtor): Remove.
11343         (make_cleanup_restore_current_traceframe): Remove.
11344         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11345         New.
11346         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11347         * infrun.c (fetch_inferior_event): Use
11348         scoped_restore_current_traceframe.
11349
11350 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11351
11352         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11353         Remove.
11354         <n_allocated_type_units>: Remove.
11355         <all_type_units>: Change to std::vector.
11356         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11357         to std::vector change.
11358         (dwarf2_per_objfile::get_cutu): Likewise.
11359         (dwarf2_per_objfile::get_tu): Likewise.
11360         (create_signatured_type_table_from_index): Likewise.
11361         (create_signatured_type_table_from_debug_names): Likewise.
11362         (dw2_symtab_iter_next): Likewise.
11363         (dw2_print_stats): Likewise.
11364         (dw2_expand_all_symtabs): Likewise.
11365         (dw2_expand_marked_cus): Likewise.
11366         (dw2_debug_names_iterator::next): Likewise.
11367         (dwarf2_initialize_objfile): Likewise.
11368         (add_signatured_type_cu_to_table): Likewise.
11369         (create_all_type_units): Likewise.
11370         (add_type_unit): Likewise.
11371         (struct tu_abbrev_offset): Add constructor.
11372         (build_type_psymtabs_1): Adjust to std::vector change.
11373         (print_tu_stats): Likewise.
11374         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11375         (write_debug_names): Likewise.
11376
11377 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11378
11379         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11380         Make an std::vector.
11381         <n_comp_units>: Remove.
11382         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11383         to std::vector change.
11384         (dwarf2_per_objfile::get_cutu): Likewise.
11385         (dwarf2_per_objfile::get_cu): Likewise.
11386         (create_cus_from_index): Likewise.
11387         (create_addrmap_from_index): Likewise.
11388         (create_addrmap_from_aranges): Likewise.
11389         (dwarf2_read_index): Likewise.
11390         (dw2_find_last_source_symtab): Likewise.
11391         (dw2_map_symtabs_matching_filename): Likewise.
11392         (dw2_symtab_iter_next): Likewise.
11393         (dw2_print_stats): Likewise.
11394         (dw2_expand_all_symtabs): Likewise.
11395         (dw2_expand_symtabs_with_fullname): Likewise.
11396         (dw2_expand_marked_cus): Likewise.
11397         (dw2_map_symbol_filenames): Likewise.
11398         (create_cus_from_debug_names): Likewise.
11399         (dwarf2_read_debug_names): Likewise.
11400         (dw2_debug_names_iterator::next): Likewise.
11401         (dwarf2_initialize_objfile): Likewise.
11402         (set_partial_user): Likewise.
11403         (dwarf2_build_psymtabs_hard): Likewise.
11404         (read_comp_units_from_section): Remove arguments, adjust to
11405         std::vector change.
11406         (create_all_comp_units): Adjust to std::vector and
11407         read_comp_units_from_section changes.
11408         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11409         change.
11410         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11411         (psyms_seen_size): Likewise.
11412         (write_gdbindex): Likewise.
11413         (write_debug_names): Likewise.
11414
11415 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11416
11417         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11418         with dwarf2_per_objfile.
11419         (create_cus_from_index): Likewise.
11420         (create_signatured_type_table_from_index): Likewise.
11421         (dwarf2_read_index): Likewise.
11422         (dwarf2_initialize_objfile): Likewise.
11423         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11424         per_cu rather than get_dwarf2_per_objfile.
11425
11426 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11427
11428         * dwarf2read.h (struct signatured_type): Forward declare.
11429         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11430         New methods.
11431         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11432         (dw2_get_cutu): ...this.
11433         (dwarf2_per_objfile::get_cu): Rename from...
11434         (dw2_get_cu): ...this.
11435         (dwarf2_per_objfile::get_tu): New.
11436         (create_addrmap_from_index): Adjust.
11437         (create_addrmap_from_aranges): Adjust.
11438         (dw2_find_last_source_symtab): Adjust.
11439         (dw2_map_symtabs_matching_filename): Adjust.
11440         (dw2_symtab_iter_next): Adjust.
11441         (dw2_print_stats): Adjust.
11442         (dw2_expand_all_symtabs): Adjust.
11443         (dw2_expand_symtabs_with_fullname): Adjust.
11444         (dw2_expand_marked_cus): Adjust.
11445         (dw_expand_symtabs_matching_file_matcher): Adjust.
11446         (dw2_map_symbol_filenames): Adjust.
11447         (dw2_debug_names_iterator::next): Adjust.
11448         (dwarf2_initialize_objfile): Adjust.
11449         (set_partial_user): Adjust.
11450         (dwarf2_build_psymtabs_hard): Adjust.
11451
11452 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11453
11454         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11455         Remove unused variables.
11456         (dw2_map_symtabs_matching_filename): Likewise.
11457         (dwarf2_record_block_ranges): Likewise.
11458         (dwarf2_read_addr_index): Likewise.
11459         (follow_die_offset): Likewise.
11460
11461 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11462
11463         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11464         to symbol_file_add_main.
11465
11466 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11467
11468         PR mi/22299
11469         * mi/mi-console.c (do_fputc_async_safe): New.
11470         (mi_console_file::write_async_safe): New.
11471         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11472         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11473         New.
11474         * ui-file.c (ui_file::putstrn): Adjust call to
11475         fputstrn_unfiltered.
11476         * utils.c (printchar): Replace do_fputs and do_fprintf
11477         parameters by do_fputc.
11478         (fputstr_filtered): Adjust call to printchar.
11479         (fputstr_unfiltered): Likewise.
11480         (fputstrn_filtered): Likewise.
11481         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11482         printchar.
11483         * utils.h (do_fputc_ftype): New typedef.
11484         (fputstrn_unfiltered): Add do_fputc parameter.
11485
11486 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11487
11488         * regformats/i386/i386-avx.dat: Remove.
11489
11490 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11491
11492         PR gdb/22979
11493         * amd64-tdep.c (amd64_none_init_abi): New function.
11494         (amd64_x32_none_init_abi): New function.
11495         (_initialize_amd64_tdep): Register handlers for x86-64 and
11496         x64_32 with GDB_OSABI_NONE.
11497         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11498         GDB_OSABI_NONE osabi.
11499
11500 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11501
11502         PR gdb/22980
11503         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11504         GDB_OSABI_NONE.
11505         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11506         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11507
11508 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11509
11510         * common/byte-vector.h (char_vector): New type.
11511         * target.h (target_read_alloc): Return
11512         gdb::optional<byte_vector>.
11513         (target_read_stralloc): Return gdb::optional<char_vector>.
11514         (target_get_osdata): Return gdb::optional<char_vector>.
11515         * target.c (target_read_alloc_1): Templatize.  Replacement
11516         manual memory management with vector.
11517         (target_read_alloc): Change return type, adjust.
11518         (target_read_stralloc): Change return type, adjust.
11519         (target_get_osdata): Change return type, adjust.
11520         * auxv.c (struct auxv_info) <length>: Remove.
11521         <data>: Change type to gdb::optional<byte_vector>.
11522         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11523         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11524         (target_auxv_search): Adjust.
11525         (fprint_target_auxv): Adjust.
11526         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11527         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11528         (linux_make_corefile_notes): Adjust.
11529         * osdata.c (get_osdata): Adjust.
11530         * remote.c (remote_get_threads_with_qxfer): Adjust.
11531         (remote_memory_map): Adjust.
11532         (remote_traceframe_info): Adjust.
11533         (btrace_read_config): Adjust.
11534         (remote_read_btrace): Adjust.
11535         (remote_pid_to_exec_file): Adjust.
11536         * solib-aix.c (solib_aix_get_library_list): Adjust.
11537         * solib-dsbt.c (decode_loadmap): Don't free buf.
11538         (dsbt_get_initial_loadmaps): Adjust.
11539         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11540         * solib-target.c (solib_target_current_sos): Adjust.
11541         * tracepoint.c (sdata_make_value): Adjust.
11542         * xml-support.c (xinclude_start_include): Adjust.
11543         (xml_fetch_content_from_file): Adjust.
11544         * xml-support.h (xml_fetch_another): Change return type.
11545         (xml_fetch_content_from_file): Change return type.
11546         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11547         * xml-tdesc.c (file_read_description_xml): Adjust.
11548         (fetch_available_features_from_target): Change return type.
11549         (target_fetch_description_xml): Adjust.
11550         (target_read_description_xml): Adjust.
11551
11552 2018-04-06  Tom Tromey  <tom@tromey.com>
11553
11554         * value.c (~value): Update.
11555         (struct value) <contents>: Now unique_xmalloc_ptr.
11556         (value_contents_bits_eq, allocate_value_contents)
11557         (value_contents_raw, value_contents_all_raw)
11558         (value_contents_for_printing, value_contents_for_printing_const)
11559         (set_value_enclosing_type): Update.
11560
11561 2018-04-06  Tom Tromey  <tom@tromey.com>
11562
11563         * value.c (range_s): Remove typedef, VEC.
11564         (struct range): Add operator<.
11565         (range_lessthan): Remove.
11566         (ranges_contain): Change type.
11567         (~value): Update.
11568         (struct value) <unavailable, optimized_out>: Now std::vector.
11569         (value_entirely_available)
11570         (value_entirely_covered_by_range_vector)
11571         (value_entirely_unavailable, value_entirely_optimized_out):
11572         Update.
11573         (insert_into_bit_range_vector): Change argument type.
11574         (find_first_range_overlap): Likewise.
11575         (struct ranges_and_idx, value_contents_bits_eq)
11576         (require_not_optimized_out, require_available): Update.
11577         (ranges_copy_adjusted): Change argument types.
11578         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11579
11580 2018-04-06  Tom Tromey  <tom@tromey.com>
11581
11582         * value.c (~value): Update.
11583         (struct value) <parent>: Now a value_ref_ptr.
11584         (value_parent, set_value_parent, value_address, value_copy):
11585         Update.
11586
11587 2018-04-06  Tom Tromey  <tom@tromey.com>
11588
11589         * value.c (struct value): Add constructor, destructor, and member
11590         initializers.
11591         (allocate_value_lazy, value_decref): Update.
11592
11593 2018-04-06  Tom Tromey  <tom@tromey.com>
11594
11595         * value.c (struct value) <released, next>: Remove.
11596         (all_values): Now a std::vector.
11597         (allocate_value_lazy): Update.
11598         (value_next): Remove.
11599         (value_mark, value_free_to_mark, release_value)
11600         (value_release_to_mark): Update.
11601
11602 2018-04-06  Tom Tromey  <tom@tromey.com>
11603
11604         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11605         (free_value_chain): Remove.
11606         * value.c (free_value_chain): Remove.
11607         (value_release_to_mark): Return a std::vector.
11608         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11609         std::vector.
11610         (check_condition): Update.
11611         * eval.c (fetch_subexp_value): Change "val_chain" to a
11612         std::vector.
11613         * breakpoint.c (update_watchpoint): Update.
11614         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11615
11616 2018-04-06  Tom Tromey  <tom@tromey.com>
11617
11618         * value.h (free_all_values): Remove.
11619         * value.c (free_all_values): Remove.
11620
11621 2018-04-06  Tom Tromey  <tom@tromey.com>
11622
11623         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11624         (value_history_chain, value_history_count): Remove.
11625         (value_history): New global.
11626         (record_latest_value, access_value_history, show_values)
11627         (preserve_values): Update.
11628
11629 2018-04-06  Tom Tromey  <tom@tromey.com>
11630
11631         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11632         * varobj.c (varobj_set_display_format, varobj_set_value)
11633         (install_default_visualizer, construct_visualizer)
11634         (install_new_value, ~varobj, varobj_get_value_type)
11635         (my_value_of_variable, varobj_editable_p): Update.
11636         * c-varobj.c (c_describe_child, c_value_of_variable)
11637         (cplus_number_of_children, cplus_describe_child): Update.
11638         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11639         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11640         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11641
11642 2018-04-06  Tom Tromey  <tom@tromey.com>
11643
11644         * printcmd.c (last_examine_address): Change type to
11645         value_ref_ptr.
11646         (do_examine, x_command): Update.
11647
11648 2018-04-06  Tom Tromey  <tom@tromey.com>
11649
11650         * value.c (release_value): Update.
11651         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11652         (struct bpstats) <val>: Now a value_ref_ptr.
11653         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11654         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11655         (~watchpoint, print_it_watchpoint, watch_command_1)
11656         (invalidate_bp_value_on_memory_change): Update.
11657
11658 2018-04-06  Tom Tromey  <tom@tromey.com>
11659
11660         * varobj.c (varobj_clear_saved_item)
11661         (update_dynamic_varobj_children, install_new_value, ~varobj):
11662         Update.
11663         * value.h (value_incref): Move declaration earlier.
11664         (value_decref): Rename from value_free.
11665         (struct value_ref_policy): New.
11666         (value_ref_ptr): New typedef.
11667         (struct value_deleter): Remove.
11668         (gdb_value_up): Remove typedef.
11669         (release_value): Change return type.
11670         (release_value_or_incref): Remove.
11671         * value.c (set_value_parent): Update.
11672         (value_incref): Change return type.
11673         (value_decref): Rename from value_free.
11674         (value_free_to_mark, free_all_values, free_value_chain): Update.
11675         (release_value): Return value_ref_ptr.
11676         (release_value_or_incref): Remove.
11677         (record_latest_value, set_internalvar, clear_internalvar):
11678         Update.
11679         * stack.c (info_frame_command): Don't call value_free.
11680         * python/py-value.c (valpy_dealloc, valpy_new)
11681         (value_to_value_object): Update.
11682         * printcmd.c (do_examine): Update.
11683         * opencl-lang.c (lval_func_free_closure): Update.
11684         * mi/mi-main.c (register_changed_p): Don't call value_free.
11685         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11686         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11687         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11688         value_free.
11689         * guile/scm-value.c (vlscm_free_value_smob)
11690         (vlscm_scm_from_value): Update.
11691         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11692         (frame_unwind_register_unsigned, get_frame_register_bytes)
11693         (put_frame_register_bytes): Don't call value_free.
11694         * findvar.c (address_from_register): Don't call value_free.
11695         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11696         * dwarf2loc.c (entry_data_value_free_closure)
11697         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11698         (dwarf2_evaluate_loc_desc_full): Update.
11699         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11700         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11701         (~watchpoint, watch_command_1)
11702         (invalidate_bp_value_on_memory_change): Update.
11703         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11704
11705 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11706
11707         PR gdb/23022
11708         * warning.m4: Add -Wno-error=deprecated-register.
11709         * configure: Re-generate.
11710
11711 2018-04-05  Tom Tromey  <tom@tromey.com>
11712
11713         * linespec.h: Remove include of "vec.h".
11714
11715 2018-04-05  Tom Tromey  <tom@tromey.com>
11716
11717         * linespec.c (typep): Remove typedef.
11718         (find_methods, find_superclass_methods): Take a std::vector.
11719         (find_method): Use std::vector.
11720
11721 2018-04-05  Tom Tromey  <tom@tromey.com>
11722
11723         * utils.c (compare_strings): Remove.
11724         * utils.h (compare_strings): Remove.
11725         * objc-lang.h (find_imps): Update.
11726         * objc-lang.c (find_methods): Take a std::vector.
11727         (uniquify_strings, find_imps): Likewise.
11728         * linespec.c (find_methods): Take a std::vector.
11729         (decode_objc): Use std::vector.
11730         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11731         a std::vector.
11732         (find_method, find_function_symbols): Use std::vector.
11733
11734 2018-04-05  Tom Tromey  <tom@tromey.com>
11735
11736         * completer.c (completion_tracker::completion_tracker): Remove
11737         cast.
11738         (completion_tracker::discard_completions): Likewise.
11739         * breakpoint.c (ambiguous_names_p): Remove cast.
11740         * ada-lang.c (_initialize_ada_language): Remove cast.
11741         * utils.h (streq): Update.
11742         (streq_hash): Add new declaration.
11743         * utils.c (streq): Return bool.
11744         (streq_hash): New function.
11745
11746 2018-04-05  Tom Tromey  <tom@tromey.com>
11747
11748         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11749         Remove a string copy.
11750
11751 2018-04-05  Tom Tromey  <tom@tromey.com>
11752
11753         * linespec.c (filter_results): Use std::vector.
11754         (decode_line_2, decode_line_full): Update.
11755
11756 2018-04-05  Tom Tromey  <tom@tromey.com>
11757
11758         * linespec.c (canonical_to_fullform): Return std::string.
11759         (filter_results): Update.
11760         (struct decode_line_2_item): Add constructor.
11761         <fullform, displayform>: Now std::string.
11762         (decode_line_2_compare_items): Now a std::sort comparator.
11763         (decode_line_2): Update.
11764
11765 2018-04-05  Tom Tromey  <tom@tromey.com>
11766
11767         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11768         (unexpected_linespec_error): Update.
11769         (linespec_parse_basic, parse_linespec): Update.
11770
11771 2018-04-05  Tom Tromey  <tom@tromey.com>
11772
11773         * linespec.c (linespec_parse_basic): Reindent.
11774
11775 2018-04-05  Tom Tromey  <tom@tromey.com>
11776
11777         * minsyms.h (iterate_over_minimal_symbols): Update.
11778         * minsyms.c (iterate_over_minimal_symbols): Take a
11779         gdb::function_view.
11780         * linespec.c (struct collect_minsyms): Remove.
11781         (compare_msyms): Now a std::sort comparator.
11782         (add_minsym): Add parameters.
11783         (search_minsyms_for_name): Update.  Use std::vector.
11784
11785 2018-04-03  Tom Tromey  <tom@tromey.com>
11786
11787         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11788         gdb::byte_vector.
11789
11790 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11791
11792         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11793
11794 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11795
11796         PR gdb/16959
11797         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11798         printing static type.
11799
11800 2018-04-01  Tom Tromey  <tom@tromey.com>
11801
11802         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11803         (rs6000_xfer_shared_libraries): Update.
11804
11805 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11806
11807         * common/gdb_vecs.h (char_ptr): Remove.
11808         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11809
11810 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11811
11812         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11813         with std::vector.
11814         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11815
11816 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11817
11818         * tracepoint.h (struct uploaded_tp): Initialize fields.
11819         <actions, step_actions, cmd_strings>: Change type to
11820         std::vector<char *>.
11821         * tracepoint.c (get_uploaded_tp): Allocate with new.
11822         (free_uploaded_tps): Free with delete.
11823         (parse_tracepoint_definition): Adjust to std::vector change.
11824         * breakpoint.c (read_uploaded_action): Likewise.
11825         (create_tracepoint_from_upload): Likewise.
11826         * ctf.c (ctf_write_uploaded_tp): Likewise.
11827         (SET_ARRAY_FIELD): Likewise.
11828         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11829
11830 2018-03-30  Tom Tromey  <tom@tromey.com>
11831
11832         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11833         std::unique_ptr.
11834         (svr4_keep_data_in_core): Update.
11835         (svr4_read_so_list): Update.
11836
11837 2018-03-30  Tom Tromey  <tom@tromey.com>
11838
11839         * windows-nat.c (handle_output_debug_string, handle_exception):
11840         Update.
11841         * target.h (target_read_string): Update.
11842         * target.c (target_read_string): Change "string" to
11843         unique_xmalloc_ptr.
11844         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11845         Update.
11846         * solib-frv.c (frv_current_sos): Update.
11847         * solib-dsbt.c (dsbt_current_sos): Update.
11848         * solib-darwin.c (darwin_current_sos): Update.
11849         * linux-thread-db.c (inferior_has_bug): Update.
11850         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11851         Update.  Remove alloca.
11852         * ada-lang.c (ada_main_name): Update.
11853
11854 2018-03-30  Tom Tromey  <tom@tromey.com>
11855
11856         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11857         (struct dwo_file_deleter): New.
11858         (dwo_file_up): New typedef.
11859         (open_and_init_dwo_file): Use dwo_file_up.
11860         (free_dwo_file_cleanup): Remove.
11861
11862 2018-03-30  Tom Tromey  <tom@tromey.com>
11863
11864         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11865         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11866
11867 2018-03-30  Tom Tromey  <tom@tromey.com>
11868
11869         * dwarf2read.c (class free_cached_comp_units): New class.
11870         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11871         (free_cached_comp_units): Remove function.
11872
11873 2018-03-30  Tom Tromey  <tom@tromey.com>
11874
11875         * utils.h (make_cleanup_unpush_target): Remove.
11876         * inf-ptrace.c (struct target_unpusher): New.
11877         (target_unpush_up) New typedef.
11878         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11879         target_unpush_up.
11880         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11881
11882 2018-03-27  Tom Tromey  <tom@tromey.com>
11883
11884         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11885
11886 2018-03-27  Pedro Alves  <palves@redhat.com>
11887             Tom Tromey  <tom@tromey.com>
11888
11889         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11890         destructor.  Now a class.
11891         (gdb_readline_wrapper_cleanup): Remove function.
11892         (gdb_readline_wrapper): Remove cleanups.
11893
11894 2018-03-27  Tom Tromey  <tom@tromey.com>
11895
11896         * typeprint.h (struct type_print_options) <local_typedefs,
11897         global_typedefs>: Remove "struct" keyword.
11898         (class typedef_hash_table): New class.
11899         (recursively_update_typedef_hash, add_template_parameters)
11900         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11901         (find_typedef_in_hash): Don't declare.
11902         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11903         (typedef_hash_table::recursively_update): Rename from
11904         recursively_update_typedef_hash.  Now a member.
11905         (typedef_hash_table::add_template_parameters): Rename from
11906         add_template_parameters.  Now a member.
11907         (typedef_hash_table::typedef_hash_table): Now a constructor;
11908         rename from create_typedef_hash.
11909         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11910         rename from free_typedef_hash.
11911         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11912         (do_free_global_table): Remove.
11913         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11914         from copy_type_recursive.
11915         (create_global_typedef_table): Remove.
11916         (typedef_hash_table::find_global_typedef): Now a member of
11917         typedef_hash_table.
11918         (typedef_hash_table::find_typedef): Rename from
11919         find_typedef_in_hash; now a member.
11920         (whatis_exp): Update.
11921         * extension.h (struct ext_lang_type_printers): Add constructor and
11922         destructor.
11923         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11924         declare.
11925         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11926         Now a constructor; rename from start_ext_lang_type_printers.
11927         (ext_lang_type_printers): Now a destructor; rename from
11928         free_ext_lang_type_printers.
11929         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11930         Update.
11931         (c_type_print_base_struct_union): Update.  Remove cleanups.
11932
11933 2018-03-27  Tom Tromey  <tom@tromey.com>
11934
11935         * dwarf-index-write.c: Include <cmath>.
11936
11937 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11938
11939         * NEWS: Add entry describing new "set|show varsize-limit" command.
11940         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11941         command.
11942         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11943         "set variable".
11944
11945 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11946
11947         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11948         dwarf-index-write.c
11949         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11950         * dwarf-index-common.c: New file.
11951         * dwarf-index-common.h: New file.
11952         * dwarf-index-write.c: New file.
11953         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11954         (struct dwarf2_section_info): Move from here.
11955         (dwarf2_section_info_def): Likewise.
11956         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11957         (offset_type): Likewise.
11958         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11959         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11960         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11961         (byte_swap): Likewise.
11962         (MAYBE_SWAP): Likewise.
11963         (dwarf2_per_cu_ptr): Likewise.
11964         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11965         (struct tu_stats): Likewise.
11966         (struct dwarf2_per_objfile): Likewise.
11967         (struct dwarf2_per_cu_data): Likewise.
11968         (struct signatured_type): Likewise.
11969         (sig_type_ptr): Likewise.
11970         (DEF_VEC_P (sig_type_ptr)): Likewise.
11971         (INDEX4_SUFFIX): Likewise.
11972         (INDEX5_SUFFIX): Likewise.
11973         (DEBUG_STR_SUFFIX): Likewise.
11974         (dwarf2_read_section): Make non-static.
11975         (mapped_index_string_hash): Move from here.
11976         (dwarf5_djb_hash): Likewise.
11977         (file_write): Likewise.
11978         (class data_buf): Likewise.
11979         (struct symtab_index_entry): Likewise.
11980         (struct mapped_symtab): Likewise.
11981         (find_slot): Likewise.
11982         (hash_expand): Likewise.
11983         (add_index_entry): Likewise.
11984         (uniquify_cu_indices): Likewise.
11985         (class c_str_view): Likewise.
11986         (class c_str_view_hasher): Likewise.
11987         (class vector_hasher): Likewise.
11988         (write_hash_table): Likewise.
11989         (psym_index_map): Likewise.
11990         (struct addrmap_index_data): Likewise.
11991         (add_address_entry): Likewise.
11992         (add_address_entry_worker): Likewise.
11993         (write_address_map): Likewise.
11994         (symbol_kind): Likewise.
11995         (write_psymbols): Likewise.
11996         (struct signatured_type_index_data): Likewise.
11997         (write_one_signatured_type): Likewise.
11998         (recursively_count_psymbols): Likewise.
11999         (recursively_write_psymbols): Likewise.
12000         (class debug_names): Likewise.
12001         (check_dwarf64_offsets): Likewise.
12002         (psyms_seen_size): Likewise.
12003         (write_gdbindex): Likewise.
12004         (write_debug_names): Likewise.
12005         (assert_file_size): Likewise.
12006         (write_psymtabs_to_index): Likewise.
12007         (save_gdb_index_command): Likewise.
12008         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12009         command.
12010         * dwarf2read.h: New file.
12011
12012 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12013
12014         PR gdb/22670
12015         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12016         symbol name if the CU's language stores symbol names in linkage
12017         format.
12018         * language.h (struct language_defn)
12019         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12020         all instances of this struct.
12021
12022 2018-03-26  Tom Tromey  <tom@tromey.com>
12023
12024         * stack.c (backtrace_command_1): Remove verbose code.
12025
12026 2018-03-26  Tom Tromey  <tom@tromey.com>
12027
12028         * python/py-framefilter.c (py_print_type): Don't catch
12029         exceptions.  Return void.
12030         (py_print_value): Likewise.
12031         (py_print_single_arg): Likewise.
12032         (enumerate_args): Don't catch exceptions.
12033         (py_print_args): Likewise.
12034         (py_print_frame): Likewise.
12035         (gdbpy_apply_frame_filter): Catch exceptions here.
12036
12037 2018-03-26  Tom Tromey  <tom@tromey.com>
12038
12039         * stack.c (_initialize_stack): Remove trailing newlines from help
12040         text.  Add "Usage" line to "backtrace" help.
12041
12042 2018-03-26  Tom Tromey  <tom@tromey.com>
12043
12044         PR python/16486:
12045         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12046
12047 2018-03-26  Tom Tromey  <tom@tromey.com>
12048
12049         * python/py-framefilter.c (py_print_single_arg): Return
12050         EXT_LANG_BT_ERROR from catch.
12051
12052 2018-03-26  Tom Tromey  <tom@tromey.com>
12053
12054         PR backtrace/15584:
12055         * stack.c (backtrace_command_1): Move some code into no-filters
12056         "if".
12057
12058 2018-03-26  Tom Tromey  <tom@tromey.com>
12059
12060         * python/py-framefilter.c (throw_quit_or_print_exception): New
12061         function.
12062         (gdbpy_apply_frame_filter): Use it.
12063
12064 2018-03-26  Tom Tromey  <tom@tromey.com>
12065
12066         PR cli/17716:
12067         * python/py-framefilter.c (py_print_type, py_print_value)
12068         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12069         RETURN_MASK_ERROR.
12070
12071 2018-03-26  Tom Tromey  <tom@tromey.com>
12072
12073         * python/py-framefilter.c (enumerate_args): Use
12074         gdb::unique_xmalloc_ptr.
12075
12076 2018-03-26  Tom Tromey  <tom@tromey.com>
12077
12078         * python/py-framefilter.c (py_print_frame): Return
12079         EXT_LANG_BT_OK.
12080         (gdbpy_apply_frame_filter): Update comment.
12081         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12082         Remove.
12083         <EXT_LANG_BT_NO_FILTERS>: Change value.
12084
12085 2018-03-26  Tom Tromey  <tom@tromey.com>
12086
12087         PR backtrace/15582:
12088         * stack.c (backtrace_command): Parse "hide" argument.
12089         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12090         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12091         constant.
12092
12093 2018-03-26  Tom Tromey  <tom@tromey.com>
12094
12095         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12096         add "flags".
12097         (backtrace_command): Remove "fulltrace", add "flags".
12098
12099 2018-03-26  Tom Tromey  <tom@tromey.com>
12100
12101         * stack.c (backtrace_command): Rewrite command line parsing.
12102
12103 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12104
12105         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12106
12107 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12108
12109         * filename-seen-cache.h: Add include guard.
12110
12111 2018-03-26  Keith Seitz  <keiths@redhat.com>
12112
12113         * symfile.c (place_section): Remove "struct" from section_addr_info
12114         in comment.
12115         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12116         "struct" keyword from section_addr_info.
12117
12118 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12119
12120         * regformats/regdef.h (reg): Add constructors.
12121
12122 2018-03-25  Pedro Alves  <palves@redhat.com>
12123
12124         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12125         if then/else bodies in var_func_name extraction.
12126
12127 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12128
12129         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12130         lookup_minimal_symbol() to find symbol entry.
12131         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12132
12133 2018-03-23  Keith Seitz  <keiths@redhat.com>
12134
12135         PR c++/22968
12136         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12137         nested type definitions for C++, too.
12138
12139 2018-03-23  Tom Tromey  <tom@tromey.com>
12140
12141         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12142         a typedef.
12143         (macho_register_oso): Remove.
12144         (macho_symtab_read): Take a std::vector.
12145         (oso_el_compare_name): Now a std::sort comparator.
12146         (macho_symfile_read_all_oso): Take a std::vector.
12147         (macho_symfile_read): Use std::vector.  Remove cleanups.
12148
12149 2018-03-22  Tom Tromey  <tom@tromey.com>
12150
12151         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12152         (record_full_goto_bookmark): Use std::string.
12153
12154 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12155
12156         PR tdep/18295
12157         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12158         a single mask.
12159
12160 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12161
12162         * rs6000-tdep.c (store_insn_p): New function.
12163         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12164         and cr_reg to their unshifted values. Use store_insn_p to
12165         match LR saves using either R1 or fdata->alloca_reg. Use
12166         store_insn_p to match CR saves. Set alloca_reg_offset
12167         when alloca_reg and framep are set. Remove lr_reg shift
12168         when assigning to fdata->lr_register.
12169
12170 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12171
12172         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12173         command line args instead of emitting a warning.
12174
12175 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12176
12177         * tracepoint.h (struct static_tracepoint_marker): Initialize
12178         fields, define default constructor, move constructor and move
12179         assignment, disable the rest.
12180         <str_id, extra>: Make std::string.
12181         (release_static_tracepoint_marker): Remove.
12182         (free_current_marker): Remove.
12183         * tracepoint.c (free_current_marker): Remove.
12184         (parse_static_tracepoint_marker_definition): Adjust to
12185         std::string, use new hex2str overload.
12186         (release_static_tracepoint_marker): Remove.
12187         (print_one_static_tracepoint_marker): Get marker by reference
12188         and adjust to std::string.
12189         (info_static_tracepoint_markers_command): Adjust to std::vector
12190         changes
12191         * target.h (static_tracepoint_marker_p): Remove typedef.
12192         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12193         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12194         bool.
12195         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12196         * target-debug.h
12197         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12198         (target_debug_print_std_vector_static_tracepoint_marker): New.
12199         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12200         to...
12201         (target_debug_print_static_tracepoint_marker_p): ... this.
12202         * target-delegates.c: Re-generate.
12203         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12204         Make std::string.
12205         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12206         (decode_static_tracepoint_spec): Adjust to std::vector.
12207         (tracepoint_print_one_detail): Adjust to std::string.
12208         (strace_marker_decode_location): Adjust to std::string.
12209         (update_static_tracepoint): Adjust to std::string, remove call
12210         to release_static_tracepoint_marker.
12211         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12212         Adjust to std::vector.
12213         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12214         (remote_static_tracepoint_markers_by_strid): Adjust to
12215         std::vector.
12216         * common/rsp-low.h (hex2str): New overload with explicit count
12217         of bytes.
12218         * common/rsp-low.c (hex2str): New overload with explicit count
12219         of bytes.
12220         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12221         (_initialize_rsp_low_selftests): Add test_hex2str test.
12222         * unittests/tracepoint-selftests.c
12223         (test_parse_static_tracepoint_marker_definition): Adjust to
12224         std::string.
12225
12226 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12227
12228         * tracepoint.c (parse_static_tracepoint_marker_definition):
12229         Consider case where the definition is followed by more
12230         definitions.
12231         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12232         tracepoint-selftests.c.
12233         * unittests/tracepoint-selftests.c: New.
12234
12235 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12236
12237         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12238         Carvalho.
12239
12240 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12241
12242         * symtab.c (find_pc_sect_line): fixed indentation.
12243
12244 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12245
12246         * symtab.c (find_pc_sect_line): now uses binary search.
12247
12248 2018-03-19  Tom Tromey  <tom@tromey.com>
12249
12250         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12251         "IDENT" production.
12252
12253 2018-03-19  Pedro Alves  <palves@redhat.com>
12254             Tom Tromey  <tom@tromey.com>
12255
12256         * unittests/observable-selftests.c: New file.
12257         * common/observable.h: New file.
12258         * observable.h: New file.
12259         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12260         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12261         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12262         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12263         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12264         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12265         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12266         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12267         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12268         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12269         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12270         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12271         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12272         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12273         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12274         tui/tui-interp.c, valops.c: Update all users.
12275         * tui/tui-hooks.c (tui_bp_created_observer)
12276         (tui_bp_deleted_observer, tui_bp_modified_observer)
12277         (tui_inferior_exit_observer, tui_before_prompt_observer)
12278         (tui_normal_stop_observer, tui_register_changed_observer):
12279         Remove.
12280         (tui_observers_token): New global.
12281         (attach_or_detach, tui_attach_detach_observers): New functions.
12282         (tui_install_hooks, tui_remove_hooks): Use
12283         tui_attach_detach_observers.
12284         * record-btrace.c (record_btrace_thread_observer): Remove.
12285         (record_btrace_thread_observer_token): New global.
12286         * observer.sh: Remove.
12287         * observer.c: Rename to observable.c.
12288         * observable.c (namespace gdb_observers): Define new objects.
12289         (observer_debug): Move into gdb_observers namespace.
12290         (struct observer, struct observer_list, xalloc_observer_list_node)
12291         (xfree_observer_list_node, generic_observer_attach)
12292         (generic_observer_detach, generic_observer_notify): Remove.
12293         (_initialize_observer): Update.
12294         Don't include observer.inc.
12295         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12296         (clean mostlyclean): Likewise.
12297         (observer.h, observer.inc): Remove targets.
12298         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12299         (COMMON_SFILES): Use observable.c, not observer.c.
12300         * .gitignore: Remove observer.h.
12301
12302 2018-03-18  Tom Tromey  <tom@tromey.com>
12303
12304         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12305         gdb::def_vector.
12306         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12307
12308 2018-03-17  Tom Tromey  <tom@tromey.com>
12309
12310         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12311
12312 2018-03-17  Tom Tromey  <tom@tromey.com>
12313
12314         * target.c (class scoped_target_fd): New.
12315         (target_fileio_close_cleanup): Remove.
12316         (target_fileio_read_alloc_1): Use scoped_target_fd.
12317
12318 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12319
12320         * silent-rules.mk: New.
12321         * Makefile.in: Include silent-rules.mk
12322         (srcdir, VPATH, top_srcdir): Move up.
12323         (COMPILE): Add ECHO_CXX.
12324         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12325         (init.c): Add ECHO_INIT_C.
12326         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12327         (version.c): Add ECHO_GEN.
12328         (printcmd.o): Add ECHO_CXX.
12329         (target-float.o): Add ECHO_CXX.
12330         (ada-exp.o): Add ECHO_CXX.
12331         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12332         (insight$(EXEEXT)): Add ECHO_CXXLD.
12333         * gnulib/configure.ac: Add AM_SILENT_RULES.
12334         * gnulib/aclocal.m4: Re-generate.
12335         * gnulib/configure: Re-generate.
12336         * gnulib/import/Makefile.in: Re-generate.
12337
12338 2018-03-16  Tom Tromey  <tom@tromey.com>
12339
12340         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12341         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12342         * utils.c (do_free_section_addr_info)
12343         (make_cleanup_free_section_addr_info): Remove.
12344         * symfile.h (struct other_sections): Add constructor.
12345         (struct section_addr_info): Remove.
12346         (section_addr_info): New typedef.
12347         (struct sym_fns) <sym_offsets>: Change type of parameter.
12348         (build_section_addr_info_from_objfile)
12349         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12350         (default_symfile_offsets, symbol_file_add)
12351         (symbol_file_add_from_bfd)
12352         (build_section_addr_info_from_section_table): Update.
12353         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12354         * symfile.c (alloc_section_addr_info): Remove.
12355         (build_section_addr_info_from_section_table): Change return type.
12356         Update.
12357         (build_section_addr_info_from_bfd)
12358         (build_section_addr_info_from_objfile): Likewise.
12359         (free_section_addr_info): Remove.
12360         (relative_addr_info_to_section_offsets): Change type of "addrs".
12361         (addrs_section_compar): Now a std::sort comparator.
12362         (addrs_section_sort): Change return type.
12363         (addr_info_make_relative): Change type of "addrs".  Update.
12364         (default_symfile_offsets, syms_from_objfile_1)
12365         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12366         (symbol_file_add_separate): Update.
12367         (symbol_file_add): Change type of "addrs".  Update.
12368         (add_symbol_file_command): Update.  Remove cleanups.
12369         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12370         cleanups.
12371         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12372         * solib.c (solib_read_symbols): Update.
12373         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12374         * machoread.c (macho_symfile_offsets): Update.
12375         * jit.c (jit_bfd_try_read_symtab): Update.
12376
12377 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12378
12379         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12380         unittests/utils-selftests.c.
12381         * unittests/utils-selftests.c: New file.
12382
12383 2018-03-14  Tom Tromey  <tom@tromey.com>
12384
12385         PR cli/14977:
12386         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12387         for NULL.
12388
12389 2018-03-14  Tom Tromey  <tom@tromey.com>
12390
12391         PR cli/19918:
12392         * printcmd.c (printf_pointer): Allow "-" in format.
12393
12394 2018-03-14  Tom Tromey  <tom@tromey.com>
12395
12396         * printcmd.c (_initialize_printcmd): Add usage to printf.
12397
12398 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12399
12400         * MAINTAINERS: Update my email address.
12401
12402 2018-03-13  Tom Tromey  <tom@tromey.com>
12403
12404         * machoread.c (macho_check_dsym): Change filenamep to a
12405         std::string*.
12406         (macho_symfile_read): Update.
12407         * symfile.c (load_command): Use std::string.
12408
12409 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12410
12411         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12412         to error message string.
12413         (riscv_register_name): Use xsnprintf instead of sprintf.
12414         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12415         internal_error.
12416         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12417         error.
12418         (riscv_push_dummy_call): Likewise.
12419
12420 2018-03-12  Tom Tromey  <tom@tromey.com>
12421
12422         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12423         Use gdb::byte_vector.
12424         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12425
12426 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12427
12428         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12429         parameter type to readable_regcache.
12430         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12431         the declaration.
12432
12433 2018-03-11  Tom Tromey  <tom@tromey.com>
12434
12435         * dwarf2read.c (struct nextfield): Add initializers.
12436         (struct nextfnfield): Remove.
12437         (struct fnfieldlist): Add initializers.  Remove "length" and
12438         "head", use std::vector.
12439         (struct decl_field_list): Remove.
12440         (struct field_info): Add initializers.
12441         <fields, baseclasses>: Now std::vector.
12442         <nbaseclasses, nfnfields, typedef_field_list_count,
12443         nested_types_list_count>: Remove.
12444         (dwarf2_add_field, dwarf2_add_type_defn)
12445         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12446         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12447         (process_structure_scope): Update.
12448
12449 2018-03-11  Tom Tromey  <tom@tromey.com>
12450
12451         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12452         for use by std::sort.
12453         (build_type_psymtabs_1): Use std::vector.
12454
12455 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12456
12457         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12458         and LIBMPFR in the printed configuration.
12459
12460 2018-03-08  Tom Tromey  <tom@tromey.com>
12461
12462         * source.c (get_filename_and_charpos): Use scoped_fd.
12463         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12464         (procfs_pidlist): Likewise.
12465         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12466         (iterate_over_mappings): Likewise.
12467
12468 2018-03-08  Tom Tromey  <tom@tromey.com>
12469
12470         * infcall.c (struct call_return_meta_info)
12471         <stack_temporaries_enabled>: Remove.
12472         (get_call_return_value, call_function_by_hand_dummy): Update.
12473         * thread.c (disable_thread_stack_temporaries): Remove.
12474         (enable_thread_stack_temporaries): Remove.
12475         (thread_stack_temporaries_enabled_p): Return bool.
12476         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12477         (get_last_thread_stack_temporary): Update.
12478         * eval.c (evaluate_subexp): Update.
12479         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12480         class, not a function.
12481         (value_ptr, value_vec): Remove typedefs.
12482         (class thread_info) <stack_temporaries_enabled>: Now bool.
12483         <stack_temporaries>: Now a std::vector.
12484         (thread_stack_temporaries_enabled_p)
12485         (value_in_thread_stack_temporaries): Return bool.
12486
12487 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12488
12489         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12490         (getpkt_or_notif_sane_1): Likewise.
12491
12492 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12493
12494         * build-id.c (build_id_to_debug_bfd): Use std::string.
12495
12496 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12497
12498         * build-id.c (find_separate_debug_file_by_buildid): Return
12499         std::string.
12500         * build-id.h (find_separate_debug_file_by_buildid): Return
12501         std::string.
12502         * coffread.c (coff_symfile_read): Adjust to std::string.
12503         * elfread.c (elf_symfile_read): Adjust to std::string.
12504         * symfile.c (separate_debug_file_exists): Change parameter to
12505         std::string.
12506         (find_separate_debug_file): Return std::string.
12507         (find_separate_debug_file_by_debuglink): Return std::string.
12508         * symfile.h (find_separate_debug_file_by_debuglink): Return
12509         std::string.
12510
12511 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12512
12513         * common/xml-utils.c (xml_escape_text): Move code to...
12514         (xml_escape_text_append): ... this new function.
12515         * common/xml-utils.h (xml_escape_text_append): New declaration.
12516         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12517         New function.
12518         (_initialize_xml_utils): register test_xml_escape_text_append as
12519         a selftest.
12520
12521 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12522
12523         * defs.h: Remove MAX_REGISTER_SIZE.
12524         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12525         asserts.
12526         * python/py-unwind.c (pyuw_sniffer): Likewise.
12527
12528 2018-03-07  Tom Tromey  <tom@tromey.com>
12529
12530         * linux-tdep.c (linux_info_proc): Update.
12531         * target.h (struct target_ops) <to_fileio_readlink>: Return
12532         optional<string>.
12533         (target_fileio_readlink): Return optional<string>.
12534         * remote.c (remote_hostio_readlink): Return optional<string>.
12535         * inf-child.c (inf_child_fileio_readlink): Return
12536         optional<string>.
12537         * target.c (target_fileio_readlink): Return optional<string>.
12538
12539 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12540
12541         * regcache.c (cooked_read_test): Add riscv to the list of
12542         architectures that have a save_reggroup.
12543
12544 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12545
12546         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12547         value is not a dynamic class object.
12548
12549 2018-03-06  Tom Tromey  <tom@tromey.com>
12550
12551         * rust-exp.y: Formatting fixes.
12552
12553 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12554
12555         * riscv-tdep.c (riscv_register_name): Remove target description
12556         support.
12557         (riscv_gdbarch_init): Remove target description check.
12558
12559 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12560
12561         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12562         comment.
12563         * riscv-tdep.h: Likewise.
12564
12565 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12566
12567         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12568         (riscv_pseudo_register_write): Delete.
12569         (riscv_gdbarch_init): Remove all use of pseudo registers.
12570
12571 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12572
12573         * record-btrace.c (btrace_print_lines): Replace cleanup
12574         parameter with RAII equivalents.
12575         (btrace_insn_history): Replace cleanup with RAII equivalents.
12576         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12577         make_cleanup_ui_out_tuple_begin_end): Remove.
12578         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12579         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12580         make_cleanup_ui_out_list_begin_end): Remove.
12581
12582 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12583
12584         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12585         parameter types to std::vector.  Use bool.
12586         (record_btrace_wait): Replace VEC(tp_t) with
12587         std::vector<thread_info *>.
12588         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12589
12590 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12591
12592         * record-btrace.c (record_btrace_disable_callback): Remove.
12593         (struct scoped_btrace_disable): New.
12594         (record_btrace_open): Use scoped_btrace_disable.
12595
12596 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12597
12598         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12599         reading values from registers.
12600
12601 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12602
12603         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12604         where appropriate.
12605
12606 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12607
12608         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12609         change parameter type.  Use GDB's print functions, and use
12610         core_addr_to_string where appropriate.
12611         (riscv_push_dummy_call): Use core_addr_to_string where
12612         appropriate, update call to riscv_print_arg_location, and reindent
12613         a few lines.
12614         (riscv_return_value): Update call to riscv_print_arg_location.
12615
12616 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12617             Tim Newsome <tim@sifive.com>
12618             Albert Ou <a0u@eecs.berkeley.edu>
12619             Darius Rad <darius@bluespec.com>
12620
12621         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12622         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12623         (ALLDEPFILES): Add riscv-tdep.c
12624         * configure.tgt: Add riscv support.
12625         * riscv-tdep.c: New file.
12626         * riscv-tdep.h: New file.
12627         * NEWS: Mention new target.
12628         * MAINTAINERS: Add entry for riscv.
12629
12630 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12631
12632         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12633         fields within aggregates.
12634
12635 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12636
12637         * record-btrace.c (btrace_print_lines): Change type of flags to
12638         gdb_disassembly_flags.
12639
12640 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12641
12642         * fbsd-nat.c: Include "inf-ptrace.h".
12643         (USE_SIGTRAP_SIGINFO): Conditionally define.
12644         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12645         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12646         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12647         function.
12648         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12649         Likewise.
12650         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12651         Likewise.
12652         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12653         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12654         "supports_stopped_by_hw_breakpoint" target methods.
12655
12656 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12657
12658         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12659         * fbsd-nat.c (debug_fbsd_nat): New variable.
12660         (show_fbsd_nat_debug): New function.
12661         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12662         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12663
12664 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12665
12666         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12667         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12668         prototype.
12669         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12670         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12671         method.
12672
12673 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12674
12675         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12676         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12677
12678 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12679
12680         * charset.c (struct charset_vector): New.
12681         (charsets): Change type to charset_vector.
12682         (find_charset_names): Adjust.
12683         (add_one): Adjust.
12684         (_initialize_charset): Adjust.
12685
12686 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12687
12688         * progspace.h (struct program_space) <deleted_solibs>: Change
12689         type to std::vector<std::string>.
12690         * progspace.c (clear_program_space_solib_cache): Adjust.
12691         * breakpoint.c (print_solib_event): Adjust.
12692         (check_status_catch_solib): Adjust.
12693         * solib.c (update_solib_list): Adjust.
12694         * ui-out.h (class ui_out) <field_string>: New overload.
12695         * ui-out.c (ui_out::field_string): New overload.
12696
12697 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12698
12699         * progspace.h (struct program_space): Add constructor and
12700         destructor, initialize fields.
12701         (add_program_space): Remove.
12702         * progspace.c (add_program_space): Rename to...
12703         (program_space::program_space): ... this.
12704         (release_program_space): Rename to...
12705         (program_space::~program_space): ... this.
12706         (delete_program_space): Use delete to delete program_space.
12707         (initialize_progspace): Use new to allocate program_space.
12708         * inferior.c (add_inferior_with_spaces): Likewise.
12709         (clone_inferior_command): Likewise.
12710         * infrun.c (follow_fork_inferior): Likewise.
12711         (handle_vfork_child_exec_or_exit): Likewise.
12712
12713 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12714
12715         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12716         (delim_string_to_char_ptr_vec): Return std::vector of
12717         gdb::unique_xmalloc_ptr.
12718         (dirnames_to_char_ptr_vec_append): Take std::vector of
12719         gdb::unique_xmalloc_ptr.
12720         (dirnames_to_char_ptr_vec): Return std::vector of
12721         gdb::unique_xmalloc_ptr.
12722         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12723         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12724         (delim_string_to_char_ptr_vec): Return an std::vector of
12725         gdb::unique_xmalloc_ptr, adjust the code.
12726         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12727         gdb::unique_xmalloc_ptr, adjust the code.
12728         (dirnames_to_char_ptr_vec): Return an std::vector of
12729         gdb::unique_xmalloc_ptr, adjust the code.
12730         * auto-load.c (auto_load_safe_path_vec): Change type to
12731         std::vector of gdb::unique_xmalloc_ptr.
12732         (auto_load_expand_dir_vars): Return an std::vector of
12733         gdb::unique_xmalloc_ptr, adjust the code.
12734         (auto_load_safe_path_vec_update): Adjust.
12735         (filename_is_in_auto_load_safe_path_vec): Adjust.
12736         (auto_load_objfile_script_1): Adjust.
12737         * build-id.c (build_id_to_debug_bfd): Adjust.
12738         * linux-thread-db.c (thread_db_load_search): Adjust.
12739         * source.c (add_path): Adjust.
12740         (openp): Adjust.
12741         * symfile.c (find_separate_debug_file): Adjust.
12742         * utils.c (do_free_char_ptr_vec): Remove.
12743         (make_cleanup_free_char_ptr_vec): Remove.
12744
12745 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12746
12747         PR gdb/22907
12748         * common/pathstuff.c: Conditionally include "<windows.h>".
12749
12750 2018-03-01  Georg Sauthoff  <mail@georg.so>
12751
12752         PR gdb/22888
12753         * gcore.in: Quote variables and switch interpreter to bash.
12754
12755 2018-03-01  Tom Tromey  <tom@tromey.com>
12756
12757         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12758         assertion.  Add assertion for discriminant_index.
12759         (quirk_rust_enum): Use correct base type name in univariant case.
12760
12761 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12762
12763         * record.c (get_call_history_modifiers): Return a
12764         record_print_flags.
12765         (cmd_record_call_history): Adjust.
12766         * record-btrace.c (record_btrace_call_history): Adjust.
12767         (record_btrace_call_history_range): Adjust.
12768         (record_btrace_call_history_from): Adjust.
12769         * target-debug.h (target_debug_print_record_print_flags): New.
12770         * target-delegates.c: Re-generate.
12771         * target.c (target_call_history): Change flags type.
12772         (target_call_history_from): Likewise.
12773         (target_call_history_range): Likewise.
12774         * target.h (struct target_ops) <target_call_history>: Likewise.
12775         (target_call_history_from): Likewise.
12776         (target_call_history_range): Likewise.
12777
12778 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12779             Simon Marchi  <simon.marchi@polymtl.ca>
12780
12781         * common/common-utils.c: Include "sys/stat.h".
12782         (is_regular_file): Move here from "source.c"; change return
12783         type to "bool".
12784         * common/common-utils.h (is_regular_file): New prototype.
12785         * common/pathstuff.c (contains_dir_separator): New function.
12786         * common/pathstuff.h (contains_dir_separator): New prototype.
12787         * source.c: Don't include "sys/stat.h".
12788         (is_regular_file): Move to "common/common-utils.c".
12789
12790 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12791
12792         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12793         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12794         * auto-load.c: Include "common/pathstuff.h".
12795         * common/common-def.h (current_directory): Move here.
12796         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12797         function.
12798         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12799         prototype.
12800         * common/pathstuff.c: New file.
12801         * common/pathstuff.h: New file.
12802         * compile/compile.c: Include "common/pathstuff.h".
12803         * defs.h (current_directory): Move to "common/common-defs.h".
12804         * dwarf2read.c: Include "common/pathstuff.h".
12805         * exec.c: Likewise.
12806         * guile/scm-safe-call.c: Likewise.
12807         * linux-thread-db.c: Likewise.
12808         * main.c: Likewise.
12809         * nto-tdep.c: Likewise.
12810         * objfiles.c: Likewise.
12811         * source.c: Likewise.
12812         * symtab.c: Likewise.
12813         * utils.c: Include "common/pathstuff.h".
12814         (gdb_realpath): Move to "common/pathstuff.c".
12815         (gdb_realpath_keepfile): Likewise.
12816         (gdb_abspath): Likewise.
12817         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12818         (gdb_realpath_keepfile): Likewise.
12819         (gdb_abspath): Likewise.
12820
12821 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12822
12823         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12824         wildcard process pid for super_resume for kernels with a
12825         specific bug.
12826
12827 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12828
12829         * compile/compile.c (get_args): Add additional comments
12830         explaining function.
12831
12832 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12833             Tom Tromey  <tom@tromey.com>
12834
12835         * target.h (memory_write_request_s): Remove typedef.  Don't define
12836         VEC.
12837         (target_write_memory_blocks): Change argument to std::vector.
12838         (struct memory_write_request): Add constructor.
12839         * target-memory.c (compare_block_starting_address): Return bool.
12840         Change argument types.
12841         (claim_memory): Change arguments to use std::vector.
12842         (split_regular_and_flash_blocks, blocks_to_erase)
12843         (compute_garbled_blocks): Likewise.
12844         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12845         (target_write_memory_blocks): Change argument to std::vector.
12846         * symfile.c (struct load_section_data): Add constructor and
12847         destructor.  Use std::vector for "requests".
12848         (struct load_progress_data): Add initializers.
12849         (load_section_callback): Update.  Use "new".
12850         (clear_memory_write_data): Remove.
12851         (generic_load): Update.
12852
12853 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12854
12855         * arch/aarch64.h: Use common/tdesc.h.
12856
12857 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12858
12859         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12860         architecture with a 64-bit ABI.
12861
12862 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12863
12864         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12865         ahead of target description loading.
12866
12867 2018-02-26  Tom Tromey  <tom@tromey.com>
12868
12869         * stack.c (backtrace_command_1): Update.
12870         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12871         of "flags".
12872         * python/py-framefilter.c (py_print_frame)
12873         (gdbpy_apply_frame_filter): Change type of "flags".
12874         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12875         of "flags".
12876         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12877         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12878         * extension.h (enum frame_filter_flag): Rename from
12879         frame_filter_flags.
12880         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12881         (apply_ext_lang_frame_filter): Change type of "flags".
12882         * extension.c (apply_ext_lang_frame_filter): Change type of
12883         "flags".
12884         * extension-priv.h (struct extension_language_ops)
12885         <apply_frame_filter>: Change type of "flags".
12886
12887 2018-02-26  Tom Tromey  <tom@tromey.com>
12888
12889         PR python/16497:
12890         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12891         off-by-one in py_end computation.
12892         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12893         PRINT_MORE_FRAMES.
12894         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12895         constant.
12896
12897 2018-02-26  Tom Tromey  <tom@tromey.com>
12898
12899         * dwarf2read.c (struct variant_field): New.
12900         (struct nextfield) <variant>: New field.
12901         (dwarf2_add_field): Handle DW_TAG_variant_part.
12902         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12903         discriminated union.
12904         (read_structure_type): Handle DW_TAG_variant_part.
12905         (handle_struct_member_die): New function, extracted from
12906         process_structure_scope.  Handle DW_TAG_variant.
12907         (process_structure_scope): Handle discriminated unions.  Call
12908         handle_struct_member_die.
12909
12910 2018-02-26  Tom Tromey  <tom@tromey.com>
12911
12912         * rust-lang.h (rust_last_path_segment): Declare.
12913         * rust-lang.c (rust_last_path_segment): Now public.  Change
12914         contract.
12915         (struct disr_info): Remove.
12916         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12917         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12918         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12919         (rust_enum_p, rust_enum_variant): New function.
12920         (rust_underscore_fields): Remove "offset" parameter.
12921         (rust_print_enum): New function.
12922         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12923         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12924         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12925         enums.
12926         (rust_internal_print_type): New function, from rust_print_type.
12927         Remove enum code.
12928         (rust_print_type): Call rust_internal_print_type.
12929         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12930         Update enum handling.
12931         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12932         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12933         (rust_union_quirks): New functions.
12934         (process_full_comp_unit, process_full_type_unit): Call
12935         rust_union_quirks.
12936         (process_structure_scope): Update rust_unions if necessary.
12937
12938 2018-02-26  Tom Tromey  <tom@tromey.com>
12939
12940         * value.h (value_union_variant): Declare.
12941         * valops.c (value_union_variant): New function.
12942         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12943         (struct discriminant_info): New.
12944         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12945         enumerator.
12946         (struct main_type) <flag_discriminated_union>: New field.
12947
12948 2018-02-26  Tom Tromey  <tom@tromey.com>
12949
12950         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12951         unittests/unpack-selftests.c.
12952         * unittests/unpack-selftests.c: New file.
12953         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12954
12955 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12956
12957         * dwarf2read.c (struct partial_die_info) <read>: New method.
12958         (read_partial_die): Remove the declaration.
12959         (load_partial_dies): Update.
12960         (partial_die_info::partial_die_info):
12961         (read_partial_die): Change it to partial_die_info::read.
12962
12963 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12964
12965         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12966         (fixup_partial_die): Remove declaration.
12967         (scan_partial_symbols): Update.
12968         (partial_die_parent_scope): Likewise.
12969         (partial_die_full_name): Likewise.
12970         (fixup_partial_die): Change it to partial_die_info::fixup.
12971
12972 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12973
12974         * dwarf2read.c (read_partial_die): Update the declaration.
12975         (load_partial_dies): Caller update.
12976         (read_partial_die): Remove one argument abbrev_len.
12977
12978 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12979
12980         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12981         assignment operator.
12982         (load_partial_dies): Use ctor and copy ctor.
12983         (read_partial_die): Update.
12984         (dwarf2_cu::find_partial_die): Use ctor.
12985
12986 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12987
12988         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12989         (find_partial_die_in_comp_unit): Change it to
12990         dwarf2_cu::find_partial_die.
12991         (find_partial_die): Update.
12992
12993 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12994
12995         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12996         is NULL.
12997
12998 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12999
13000         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13001
13002 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13003
13004         * arch/amd64.h: Use common/tdesc.h.
13005         * arch/i386.c: Likewise.
13006         * arch/i386.h: Likewise.
13007         * arch/tic6x.c: Likewise.
13008         * arch/tdesc.h: Move file from here...
13009         * common/tdesc.h: ...to here.
13010         * features/aarch64-core.c: Regenerate.
13011         * features/aarch64-fpu.c: Regenerate.
13012         * features/i386/32bit-avx.c: Regenerate.
13013         * features/i386/32bit-avx512.c: Regenerate.
13014         * features/i386/32bit-core.c: Regenerate.
13015         * features/i386/32bit-linux.c: Regenerate.
13016         * features/i386/32bit-mpx.c: Regenerate.
13017         * features/i386/32bit-pkeys.c: Regenerate.
13018         * features/i386/32bit-sse.c: Regenerate.
13019         * features/i386/64bit-avx.c: Regenerate.
13020         * features/i386/64bit-avx512.c: Regenerate.
13021         * features/i386/64bit-core.c: Regenerate.
13022         * features/i386/64bit-linux.c: Regenerate.
13023         * features/i386/64bit-mpx.c: Regenerate.
13024         * features/i386/64bit-pkeys.c: Regenerate.
13025         * features/i386/64bit-segments.c: Regenerate.
13026         * features/i386/64bit-sse.c: Regenerate.
13027         * features/i386/x32-core.c: Regenerate.
13028         * features/tic6x-c6xp.c: Regenerate.
13029         * features/tic6x-core.c: Regenerate.
13030         * features/tic6x-gp.c: Regenerate.
13031         * target-descriptions.c: Use common/tdesc.h.
13032         * target-descriptions.h: Likewise.
13033
13034 2018-02-24  Tom Tromey  <tom@tromey.com>
13035
13036         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13037         (try_thread_db_load_from_dir, thread_db_load_search): Use
13038         std::string.
13039         (info_auto_load_libthread_db_compare): Return bool.  Change
13040         argument types.
13041         (info_auto_load_libthread_db): Use std::vector, std::string.
13042         Remove cleanups.
13043
13044 2018-02-24  Tom Tromey  <tom@tromey.com>
13045
13046         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13047         std::string.
13048         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13049         std::string*.
13050         * gdbarch.c: Rebuild.
13051         * gdbarch.h: Rebuild.
13052         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13053         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13054         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13055         std::string*.
13056
13057 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13058
13059         * gdbtypes.h (sect_offset): Change type to uint64_t.
13060         (sect_offset_str): New function.
13061         * dwarf2read.c (create_addrmap_from_aranges): Use
13062         sect_offset_str.
13063         (error_check_comp_unit_head): Likewise.
13064         (create_debug_type_hash_table): Likewise.
13065         (read_cutu_die_from_dwo): Likewise.
13066         (init_cutu_and_read_dies): Likewise.
13067         (init_cutu_and_read_dies_no_follow): Likewise.
13068         (process_psymtab_comp_unit_reader): Likewise.
13069         (partial_die_parent_scope): Likewise.
13070         (peek_die_abbrev): Likewise.
13071         (process_queue): Likewise.
13072         (dwarf2_physname): Likewise.
13073         (read_namespace_alias): Likewise.
13074         (read_import_statement): Likewise.
13075         (create_dwo_cu_reader): Likewise.
13076         (create_cus_hash_table): Likewise.
13077         (lookup_dwo_cutu): Likewise.
13078         (inherit_abstract_dies): Likewise.
13079         (read_func_scope): Likewise.
13080         (read_call_site_scope): Likewise.
13081         (dwarf2_add_member_fn): Likewise.
13082         (read_common_block): Likewise.
13083         (read_module_type): Likewise.
13084         (read_typedef): Likewise.
13085         (read_subrange_type): Likewise.
13086         (load_partial_dies): Likewise.
13087         (read_partial_die): Likewise.
13088         (find_partial_die): Likewise.
13089         (read_str_index): Likewise.
13090         (dwarf2_string_attr): Likewise.
13091         (build_error_marker_type): Likewise.
13092         (lookup_die_type): Likewise.
13093         (dump_die_shallow): Likewise.
13094         (follow_die_ref): Likewise.
13095         (dwarf2_fetch_die_loc_sect_off): Likewise.
13096         (dwarf2_fetch_constant_bytes): Likewise.
13097         (follow_die_sig): Likewise.
13098         (get_signatured_type): Likewise.
13099         (get_DW_AT_signature_type): Likewise.
13100         (dwarf2_find_containing_comp_unit): Likewise.
13101         (set_die_type): Likewise.
13102
13103 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13104
13105         * arch/aarch64.c: Include "common-defs.h".
13106         * arch/amd64.c: Likewise.
13107         * arch/i386.c: Likewise.
13108
13109 2018-02-21  Tom Tromey  <tom@tromey.com>
13110
13111         * value.h: (extract_field_op): Update.
13112         * eval.c (extract_field_op): Return a const char *.
13113         * expression.h (parse_expression_for_completion): Update.
13114         * completer.c (complete_expression): Update.
13115         (add_struct_fields): Make fieldname const.
13116         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13117         (mark_completion_tag, parse_exp_in_context_1): Update.
13118         (parse_expression_for_completion): Change "name" to
13119         unique_xmalloc_ptr*.
13120
13121 2018-02-21  Tom Tromey  <tom@tromey.com>
13122
13123         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13124
13125 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13126
13127         * avr-tdep.c (avr_read_pc): Change parameter type to
13128         readable_regcache.
13129         * gdbarch.sh (read_pc): Likewise.
13130         * gdbarch.c: Re-generated.
13131         * gdbarch.h: Re-generated.
13132         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13133         readable_regcache.
13134         * ia64-tdep.c (ia64_read_pc): Likewise.
13135         * mips-tdep.c (mips_read_pc): Likewise.
13136         * spu-tdep.c (spu_read_pc): Likewise.
13137
13138 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13139
13140         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13141         * regcache-dump.c: New file.
13142         * regcache.c: Move register_dump to regcache-dump.c.
13143         (maintenance_print_registers): Likewise.
13144         (maintenance_print_raw_registers): Likewise.
13145         (maintenance_print_cooked_registers): Likewise.
13146         (maintenance_print_register_groups): Likewise.
13147         (maintenance_print_remote_registers): Likewise.
13148         (_initialize_regcache): Likewise.
13149         * regcache.h (register_dump): Moved from regcache.c.
13150
13151 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13152
13153         * regcache.c (regcache::regcache): Update.
13154         (regcache::invalidate): Move it to detached_regcache::invalidate.
13155         (get_thread_arch_aspace_regcache): Update.
13156         (regcache::raw_update): Update.
13157         (regcache::cooked_read): Remove some code.
13158         (regcache::cooked_read_value): Likewise.
13159         (regcache::raw_write): Remove assert on m_readonly_p.
13160         (regcache::raw_supply_integer): Move it to
13161         detached_regcache::raw_supply_integer.
13162         (regcache::raw_supply_zeroed): Likewise.
13163         * regcache.h (detached_regcache) <raw_supply_integer>: New
13164         declaration.
13165         <raw_supply_zeroed, invalidate>: Likewise.
13166         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13167         <invalidate>: Likewise.
13168         <m_readonly_p>: Removed.
13169
13170 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13171
13172         * infcmd.c (get_return_value): Let stop_regs point to
13173         get_current_regcache.
13174         * regcache.c (regcache::regcache): Remove.
13175         (register_dump_reg_buffer): New class.
13176         (regcache_print): Adjust.
13177         * regcache.h (regcache): Remove constructors.
13178
13179 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13180
13181         * regcache.c (class register_dump): New class.
13182         (register_dump_regcache, register_dump_none): New class.
13183         (register_dump_remote, register_dump_groups): New class.
13184         (regcache_print): Update.
13185         * regcache.h (regcache_dump_what): Move it to regcache.c.
13186         (regcache) <dump>: Remove.
13187
13188 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13189
13190         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13191          reg_buffer_rw *.
13192         (jit_unwind_reg_set_impl): Call raw_supply.
13193         (jit_frame_sniffer): Use reg_buffer_rw.
13194         * record-full.c (record_full_core_regbuf): Change its type.
13195         (record_full_core_open_1): Use reg_buffer_rw.
13196         (record_full_close): Likewise.
13197         (record_full_core_fetch_registers): Use regcache->raw_supply.
13198         (record_full_core_store_registers): Likewise.
13199         * regcache.c (regcache::get_register_status): Move it to
13200         reg_buffer.
13201         (regcache_raw_set_cached_value): Remove.
13202         (regcache::raw_set_cached_value): Remove.
13203         (regcache::raw_write): Call raw_supply.
13204         (regcache::raw_supply): Move it to reg_buffer_rw.
13205         * regcache.h (regcache_raw_set_cached_value): Remove.
13206         (reg_buffer_rw): New class.
13207
13208 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13209
13210         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13211         readonly_detached_regcache.
13212         (dummy_frame_prev_register): Use regcache->cooked_read.
13213         * frame.c (frame_save_as_regcache): Change return type.
13214         (frame_pop): Update.
13215         * frame.h (frame_save_as_regcache): Update declaration.
13216         * inferior.h (get_infcall_suspend_state_regcache): Update
13217         declaration.
13218         * infrun.c (infcall_suspend_state) <registers>: use
13219         readonly_detached_regcache.
13220         (save_infcall_suspend_state): Don't use regcache_dup.
13221         (get_infcall_suspend_state_regcache): Change return type.
13222         * linux-fork.c (struct fork_info) <savedregs>: Change to
13223         readonly_detached_regcache.
13224         <pc>: New field.
13225         (fork_save_infrun_state): Don't use regcache_dup.
13226         (info_checkpoints_command): Adjust.
13227         * mi/mi-main.c (register_changed_p): Update declaration.
13228         (mi_cmd_data_list_changed_registers): Use
13229         readonly_detached_regcache.
13230         (register_changed_p): Change parameter type to
13231         readonly_detached_regcache.
13232         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13233         readonly_detached_regcache.
13234         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13235         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13236         New.
13237         (regcache::save): Move it to reg_buffer.
13238         (regcache::restore): Change parameter type.
13239         (regcache_dup): Remove.
13240         * regcache.h (reg_buffer) <save>: New method.
13241         (readonly_detached_regcache): New class.
13242         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13243         readonly_detached_regcache.
13244         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13245
13246 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13247
13248         * frame.c (frame_save_as_regcache): Use regcache method save.
13249         (frame_pop): Use regcache method restore.
13250         * infrun.c (restore_infcall_suspend_state): Likewise.
13251         * linux-fork.c (fork_load_infrun_state): Likewise.
13252         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13253         save.
13254         * regcache.c (regcache_save): Remove.
13255         (regcache::restore): More asserts.
13256         (regcache_cpy): Remove.
13257         * regcache.h (regcache_save): Remove the declaration.
13258         (regcache::restore): Move from private to public.
13259         Remove the friend declaration of regcache_cpy.
13260         (regcache_cpy): Remove declaration.
13261
13262 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13263
13264         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13265         parameter type to 'readable_regcache *'.
13266         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13267         * arm-tdep.c (arm_neon_quad_read): Likewise.
13268         (arm_pseudo_read): Likewise.
13269         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13270         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13271         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13272         * gdbarch.c: Re-generated.
13273         * gdbarch.h: Re-generated.
13274         * gdbarch.sh (pseudo_register_read): Change parameter type to
13275         'readable_regcache *'.
13276         (pseudo_register_read_value): Likewise.
13277         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13278         (h8300_pseudo_register_read): Likewise.
13279         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13280         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13281         (i386_pseudo_register_read_into_value): Likewise.
13282         (i386_pseudo_register_read_value): Likewise.
13283         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13284         declaration.
13285         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13286         * m32c-tdep.c (m32c_raw_read): Likewise.
13287         (m32c_read_flg): Likewise.
13288         (m32c_banked_register): Likewise.
13289         (m32c_banked_read): Likewise.
13290         (m32c_sb_read): Likewise.
13291         (m32c_part_read): Likewise.
13292         (m32c_cat_read): Likewise.
13293         (m32c_r3r2r1r0_read): Likewise.
13294         (m32c_pseudo_register_read): Likewise.
13295         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13296         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13297         (mep_pseudo_cr64_read): Likewise.
13298         (mep_pseudo_register_read): Likewise.
13299         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13300         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13301         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13302         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13303         (regcache::cooked_read): Likewise.
13304         (regcache::cooked_read_value): Likewise.
13305         (regcache_cooked_read_signed):
13306         (regcache::cooked_read): Likewise.
13307         * regcache.h (readable_regcache): New class.
13308         (regcache): Inherit readable_regcache.  Move some methods to
13309         readable_regcache.
13310         * rl78-tdep.c (rl78_pseudo_register_read): Change
13311         parameter type to 'readable_regcache *'.
13312         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13313         (e500_pseudo_register_read): Change parameter type to
13314         'readable_regcache *'.
13315         (dfp_pseudo_register_read): Likewise.
13316         (vsx_pseudo_register_read): Likewise.
13317         (efpr_pseudo_register_read): Likewise.
13318         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13319         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13320         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13321         (sh64_pseudo_register_read): Likewise.
13322         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13323         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13324         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13325         (spu_pseudo_register_read): Likewise.
13326         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13327         (xtensa_pseudo_register_read): Likewise.
13328
13329 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13330
13331         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13332         (regcache::arch): Move it to reg_buffer::arch.
13333         (regcache::register_buffer): Likewise.
13334         (regcache::assert_regnum): Likewise.
13335         (regcache::num_raw_registers): Likewise.
13336         * regcache.h (reg_buffer): New class.
13337         (regcache): Inherit reg_buffer.
13338
13339 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13340
13341         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13342         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13343
13344 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13345
13346         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13347
13348 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13349
13350         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13351         (SFILES): Remove common/*.c files.
13352         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13353         * common/common.host: Add common reference.
13354         * configure.ac: Likewise.
13355         * configure: Regenerate.
13356
13357 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13358
13359         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13360         (block_initialize_namespace): Use new.
13361         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13362         (dwarf2_free_objfile): Use delete.
13363         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13364         (copy_type_recursive): Use new.
13365         * gdb_obstack.h (allocate_on_obstack): New.
13366
13367 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13368
13369         PR gdb/22849
13370         * inferior.c (exit_inferior_1): Reset inf->control.
13371
13372 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13373
13374         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13375         declaration.
13376
13377 2018-02-14  Pedro Alves  <palves@redhat.com>
13378
13379         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13380         frame_cleanup_after_sniffer on exception.
13381
13382 2018-02-14  Tom Tromey  <tom@tromey.com>
13383
13384         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13385         const.
13386         (solib_bfd_open): Make pathname const.
13387         * solib.c (solib_bfd_open): Make pathname const.
13388         * solib-spu.c (spu_bfd_fopen): Make name const.
13389         (spu_bfd_open): Make pathname const.
13390         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13391         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13392
13393 2018-02-14  Tom Tromey  <tom@tromey.com>
13394
13395         * symfile.c (symfile_bfd_open): Update.
13396         * source.h (openp, source_full_path_of, find_and_open_source):
13397         Change argument type to unique_xmalloc_ptr.
13398         * source.c (openp): Take a unique_xmalloc_ptr.
13399         (source_full_path_of, find_and_open_source): Likewise.
13400         (open_source_file, symtab_to_fullname): Update.
13401         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13402         unique_xmalloc_ptr.
13403         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13404         (exec_file_find): Update.
13405         * psymtab.c (psymtab_to_fullname): Update.
13406         * nto-tdep.h (nto_find_and_open_solib): Update.
13407         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13408         unique_xmalloc_ptr.
13409         * exec.c (exec_file_attach): Update.
13410         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13411         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13412
13413 2018-02-14  Tom Tromey  <tom@tromey.com>
13414
13415         * solib.c: Include source.h.
13416         * nto-tdep.c: Include source.h.
13417         * mi/mi-cmd-env.c: Include source.h.
13418         * infcmd.c: Include source.h.
13419         * exec.c: Include source.h.
13420         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13421         (add_path, directory_switch, source_path, init_source_path): Move
13422         declarations...
13423         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13424         (add_path, directory_switch, source_path, init_source_path):
13425         ...here.
13426
13427 2018-02-14  Tom Tromey  <tom@tromey.com>
13428
13429         * solist.h (exec_file_find, solib_find): Return
13430         unique_xmalloc_ptr.
13431         (solib_bfd_fopen): Take a const char *.
13432         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13433         (exec_file_find, solib_find): Likewise.
13434         (solib_bfd_fopen): Do not take ownership of "pathname".
13435         (solib_bfd_open): Use unique_xmalloc_ptr.
13436         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13437         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13438         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13439         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13440
13441 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13442
13443         * ada-lang.c (name_match_type_from_name): Remove reference to
13444         ada_name_for_lookup in function's documentation.
13445         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13446
13447 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13448
13449         * defs.h (enum openp_flags): New enum.
13450         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13451         Move to enum openp_flags.
13452         (openp_flags): New enum flags.
13453         (openp): Change parameter type to openp_flags.
13454         * source.c (openp): Change parameter type to openp_flags.
13455         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13456         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13457
13458 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13459
13460         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13461         per-command.
13462
13463 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13464
13465         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13466         into...
13467         (class dwarf2_queue_guard): ...the destructor of this new class.
13468         (dw2_do_instantiate_symtab): Create instance of the new class
13469         dwarf2_queue_guard, remove cleanup.
13470
13471 2018-02-09  Tom Tromey  <tom@tromey.com>
13472
13473         * source.c (find_source_lines): Don't reference past the end of
13474         the vector.
13475
13476 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13477
13478         * remote.c (remote_btrace_maybe_reopen): Change error message.
13479         * btrace.c (btrace_enable): Likewise.
13480         (parse_xml_btrace): Likewise.
13481         (parse_xml_btrace_conf): Likewise.
13482
13483 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13484
13485         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13486         (linux_enable_pt, linux_enable_bts): Call
13487         diagnose_perf_event_open_fail.
13488
13489 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13490
13491         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13492         Remove parameter and change return type.  Update callers.  Move it.
13493         (linux_enable_bts, linux_enable_pt): Improve error message.
13494         (linux_enable_pt): Remove zero buffer size check.
13495         (linux_enable_btrace): Improve error messages.  Remove NULL return
13496         check.
13497
13498 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13499
13500         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13501         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13502         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13503         (linux_supports_pt, linux_supports_btrace): Remove.
13504         (linux_enable_bts): Call cpu_supports_bts.
13505         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13506         * remote.c (remote_supports_btrace): Remove.
13507         (init_remote_ops): Remove remote_supports_btrace.
13508         * target-delegates.c: Regenerated.
13509         * target.c (target_supports_btrace): Remove.
13510         * target.h (target_ops) <to_supports_btrace>: Remove
13511         (target_supports_btrace): Remove.
13512         * x86-linux-nat.c (x86_linux_create_target): Remove
13513         linux_supports_btrace.
13514
13515 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13516
13517         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13518         btrace failed.
13519         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13520         exception and use message in own exception.
13521
13522 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13523
13524         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13525         (perf_event_pt_event_type): Use gdb_file_up.
13526         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13527         scoped_fd, and scoped_mmap.
13528
13529 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13530
13531         * common/scoped_mmap.h: New.
13532         * unittests/scoped_mmap-selftest.c: New.
13533         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13534         unittests/scoped_mmap-selftest.c.
13535
13536 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13537
13538         * common/scoped_fd.h: New.
13539         * unittests/scoped_fd-selftest.c: New.
13540         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13541         unittests/scoped_fd-selftest.c.
13542
13543 2018-02-09  Tom Tromey  <tom@tromey.com>
13544
13545         * auto-load.c (auto_load_section_scripts): Use
13546         gdb::unique_xmalloc_ptr.
13547
13548 2018-02-09  Tom Tromey  <tom@tromey.com>
13549
13550         * auto-load.c (execute_script_contents): Use std::string.
13551
13552 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13553
13554         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13555         Python function, rather than a new command.
13556
13557 2018-02-08  Tom Tromey  <tom@tromey.com>
13558
13559         * solib.c (solib_find_1): Use std::string.
13560         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13561
13562 2018-02-08  Tom Tromey  <tom@tromey.com>
13563
13564         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13565
13566 2018-02-08  Tom Tromey  <tom@tromey.com>
13567
13568         * source.c (find_source_lines): Use gdb::def_vector.
13569
13570 2018-02-08  Tom Tromey  <tom@tromey.com>
13571
13572         * macrocmd.c (struct temporary_macro_definition): New.
13573         (macro_define_command): Use temporary_macro_definition.  Remove
13574         cleanups.
13575         (free_macro_definition_ptr): Remove.
13576
13577 2018-02-08  Tom Tromey  <tom@tromey.com>
13578
13579         * macroexp.c (maybe_expand): Use std::string.
13580
13581 2018-02-08  Tom Tromey  <tom@tromey.com>
13582
13583         * macroexp.c (struct macro_buffer): Add initializers for some
13584         members.
13585         (init_buffer, init_shared_buffer, free_buffer)
13586         (free_buffer_return_text): Remove.
13587         (macro_buffer): New constructors.
13588         (~macro_buffer): New destructor.
13589         (macro_buffer::set_shared): New method.
13590         (macro_buffer::resize_buffer, macro_buffer::appendc)
13591         (macro_buffer::appendmem): Now methods, not free functions.
13592         (set_token, append_tokens_without_splicing, stringify)
13593         (macro_stringify): Update.
13594         (gather_arguments): Change return type.  Remove argc_p argument,
13595         add args_ptr argument.  Use std::vector.
13596         (substitute_args): Remove argc argument.  Accept std::vector.
13597         (expand): Update.  Use std::vector.
13598         (scan, macro_expand, macro_expand_next): Update.
13599
13600 2018-02-08  Tom Tromey  <tom@tromey.com>
13601
13602         * symtab.c (default_collect_symbol_completion_matches_break_on):
13603         Use unique_xmalloc_ptr.
13604         * macroscope.h: (sal_macro_scope, user_macro_scope)
13605         (default_macro_scope): Return unique_xmalloc_ptr.
13606         * macroscope.c (sal_macro_scope, user_macro_scope)
13607         (default_macro_scope): Return unique_xmalloc_ptr.
13608         * macroexp.h (macro_expand, macro_expand_once): Return
13609         unique_xmalloc_ptr.
13610         * macroexp.c (macro_expand, macro_expand_once): Return
13611         unique_xmalloc_ptr.
13612         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13613         (info_macro_command, info_macros_command): Use
13614         unique_xmalloc_ptr.
13615         * compile/compile-c-support.c (write_macro_definitions): Use
13616         unique_xmalloc_ptr.
13617         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13618
13619 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13620
13621         * value.c (value_static_field): Assign field type instead of
13622         containing type when returning an optimized out value.
13623
13624 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13625
13626         * ft32-tdep.c (ft32_read_pc): Remove.
13627         (ft32_write_pc): Remove.
13628         (ft32_gdbarch_init): Update.
13629         * m32r-tdep.c (m32r_read_pc): Remove.
13630         (m32r_gdbarch_init): Update.
13631         * mep-tdep.c (mep_read_pc): Remove.
13632         (mep_gdbarch_init): Update.
13633         * microblaze-tdep.c (microblaze_write_pc): Remove.
13634         (microblaze_gdbarch_init): Update.
13635         * mn10300-tdep.c (mn10300_read_pc): Remove.
13636         (mn10300_write_pc): Remove.
13637         (mn10300_gdbarch_init): Update.
13638         * moxie-tdep.c (moxie_read_pc): Remove.
13639         (moxie_write_pc): Remove.
13640         (moxie_gdbarch_init): Update.
13641
13642 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13643
13644         * expprint.c (print_subexp_standard): Handle
13645         OP_F77_UNDETERMINED_ARGLIST.
13646         (dump_subexp_body_standard): Likewise.
13647
13648 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13649
13650         * target-descriptions.c (tdesc_element_visitor) Add empty
13651         implementations.
13652         (tdesc_type): Move make_gdb_type from here.
13653         (tdesc_type_builtin): Likewise.
13654         (tdesc_type_vector): Likewise.
13655         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13656         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13657         (make_gdb_type_union): Likewise.
13658         (make_gdb_type_flags): Likewise.
13659         (make_gdb_type_enum): Likewise.
13660         (make_gdb_type): New function.
13661         (tdesc_register_type): Use static make_gdb_type.
13662
13663 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13664
13665         * infcmd.c (default_print_one_register_info): Align natural-format
13666         column values consistently one under another.
13667         (pad_to_column): New function.
13668
13669 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13670
13671         * dwarf2read.c (dwarf2_physname): Move commment.
13672
13673 2018-02-01  Leszek Swirski  <leszeks@google.com>
13674
13675         * varobj.c (varobj_formatted_print_options): Allow recursive
13676         pretty printing if pretty printing is enabled.
13677
13678 2018-02-01  Leszek Swirski  <leszeks@google.com>
13679
13680         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13681         names after a structop as a filename.
13682
13683 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13684
13685         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13686         (arm_record_coproc_data_proc): Likewise.
13687
13688 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13689
13690         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13691
13692 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13693
13694         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13695         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13696
13697 2018-01-31  Pedro Alves  <palves@redhat.com>
13698
13699         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13700         * inflow.c (child_terminal_save_inferior): Wrap reference to
13701         tcgetpgrp in HAVE_TERMIOS_H.
13702         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13703         _WIN32.
13704         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13705         always iterate over all inferiors.
13706         (gdbsim_cntrl_c): Adjust.
13707         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13708
13709 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13710
13711         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13712         index type is objfile-owned if the element type is as well.
13713
13714 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13715
13716         GDB 8.1 released.
13717
13718 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13719
13720         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13721         "features/s390x-linux64.c".
13722         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13723         s390_linux32 and s390x_linux64.
13724         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13725         default tdesc.
13726         * s390-tdep.c: Include "features/s390-linux32.c" and
13727         "features/s390x-linux64.c".
13728         (s390_tdesc_valid): Add check for tdesc_has_registers.
13729         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13730         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13731         tdesc_s390x_linux64.
13732         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13733         tdesc_s390x_linux64 to...
13734         * s390-tdep.h: ...here.
13735
13736 2018-01-30  Pedro Alves  <palves@redhat.com>
13737
13738         PR gdb/13211
13739         * config.in, configure: Regenerate.
13740         * configure.ac: Check for getpgid.
13741         * go32-nat.c (go32_pass_ctrlc): New.
13742         (go32_target): Install it.
13743         * inf-child.c (inf_child_target): Install
13744         child_terminal_save_inferior, child_pass_ctrlc and
13745         child_interrupt.
13746         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13747         (inf_ptrace_target): No longer install it.
13748         * infcmd.c (interrupt_target_1): Adjust.
13749         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13750         (child_interrupt): Declare.
13751         (inferior::terminal_state): New.
13752         * inflow.c (struct terminal_info): Update comments.
13753         (inferior_process_group): Delete.
13754         (terminal_is_ours): Delete.
13755         (gdb_tty_state): New.
13756         (child_terminal_init): Adjust.
13757         (is_gdb_terminal, sharing_input_terminal_1)
13758         (sharing_input_terminal): New functions.
13759         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13760         Set the process's actual process group in the foreground if
13761         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13762         mark terminal as the inferior's if not sharing GDB's terminal.
13763         Don't check attach_flag.
13764         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13765         pass down a target_terminal_state.
13766         (child_terminal_save_inferior): New, factored out from ...
13767         (child_terminal_ours_1): ... this.  Handle
13768         target_terminal_state::is_ours_for_output.
13769         (child_interrupt, child_pass_ctrlc): New.
13770         (inflow_inferior_exit): Clear the inferior's terminal_state.
13771         (copy_terminal_info): Copy the inferior's terminal state.
13772         (_initialize_inflow): Remove reference to terminal_is_ours.
13773         * inflow.h (inferior_process_group): Delete.
13774         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13775         * procfs.c (procfs_target): Don't install procfs_interrupt.
13776         (procfs_interrupt): Delete.
13777         * remote.c (remote_serial_quit_handler): Adjust.
13778         (remote_interrupt): Remove ptid parameter.  Adjust.
13779         * target-delegates.c: Regenerate.
13780         * target.c: Include "terminal.h".
13781         (target_terminal::terminal_state): Rename to ...
13782         (target_terminal::m_terminal_state): ... this.
13783         (target_terminal::init): Adjust.
13784         (target_terminal::inferior): Adjust to per-inferior
13785         terminal_state.
13786         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13787         (target_terminal::ours, target_terminal::ours_for_output): Use
13788         target_terminal_is_ours_kind.
13789         (target_interrupt): Remove ptid parameter.  Adjust.
13790         (default_target_pass_ctrlc): Adjust.
13791         * target.h (target_ops::to_terminal_save_inferior): New field.
13792         (target_ops::to_interrupt): Remove ptid_t parameter.
13793         (target_interrupt): Remove ptid_t parameter.  Update comment.
13794         (target_pass_ctrlc): Update comment.
13795         * target/target.h (target_terminal_state): New scoped enum,
13796         factored out of ...
13797         (target_terminal::terminal_state): ... here.
13798         (target_terminal::inferior): Update comments.
13799         (target_terminal::restore_inferior): New.
13800         (target_terminal::is_inferior, target_terminal::is_ours)
13801         (target_terminal::is_ours_for_output): Adjust.
13802         (target_terminal::scoped_restore_terminal_state): Adjust to
13803         rename, and call restore_inferior() instead of inferior().
13804         (target_terminal::scoped_restore_terminal_state::m_state): Change
13805         type.
13806         (target_terminal::terminal_state): Rename to ...
13807         (target_terminal::m_terminal_state): ... this and change type.
13808
13809 2018-01-30  Pedro Alves  <palves@redhat.com>
13810
13811         * linux-nat.c (wait_for_signal): New function.
13812         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13813         directly.
13814         (async_terminal_is_ours)
13815         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13816         (linux_nat_add_target): Don't override
13817         to_terminal_inferior/to_terminal_ours.
13818
13819 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13820
13821         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13822
13823 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13824
13825         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13826         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13827         dwarf2_per_objfile_free here.
13828         (dwarf2_per_objfile_free): Remove.
13829         (_initialize_dwarf2_read): Don't register
13830         dwarf2_per_objfile_free as a registry cleanup.
13831
13832 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13833
13834         Avoid compilation errors in MinGW native builds
13835
13836         The error is triggered by including python-internal.h, and the
13837         error message is:
13838
13839              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13840                       from build-gnulib/import/math.h:27,
13841                       from d:/usr/Python26/include/pyport.h:235,
13842                       from d:/usr/Python26/include/Python.h:58,
13843                       from python/python-internal.h:94,
13844                       from python/py-arch.c:24:
13845              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13846         using ::hypot;
13847                 ^~~~~
13848
13849         This happens because Python headers define 'hypot' to expand t
13850         '_hypot' in the Windows builds.
13851         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13852         'hypoth'.  This avoids a compilation error.
13853
13854 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13855
13856         * MAINTAINERS (Write After Approval): Fix ordering.
13857
13858 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13859
13860         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13861
13862 2018-01-26  Alan Modra  <amodra@gmail.com>
13863
13864         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13865         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13866         Remove nop.  Make const.  Comment.
13867         (powerpc32_plt_stub_so_2): New.
13868         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13869         Correct count.  Update uses.
13870         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13871         Move common code reading PLT entry word.  Correct
13872         powerpc32_plt_stub PLT address calculation.
13873         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13874         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13875         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13876         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13877         (ppc64_standard_linkage8): Likewise.
13878         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13879         Correct insns description.
13880         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13881
13882 2018-01-24  Pedro Alves  <palves@redhat.com>
13883
13884         GCC PR libstdc++/83906
13885         * gdbtypes.c (operator==(const dynamic_prop &,
13886         const dynamic_prop &)): New.
13887         (operator==(const range_bounds &, const range_bounds &)): New.
13888         (check_types_equal): Use them instead of memcmp.
13889         * gdbtypes.h (operator==(const dynamic_prop &,
13890         const dynamic_prop &)): Declare.
13891         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13892         (operator==(const range_bounds &, const range_bounds &)): Declare.
13893         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13894
13895 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13896
13897         * s390-linux-tdep.c (s390_record_address_mask)
13898         (s390_record_calc_disp_common, s390_record_calc_disp)
13899         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13900         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13901         (s390_process_record): Move to s390-tdep.c.
13902         (s390_linux_init_abi_any): Adjust.
13903         * s390-tdep.c (s390_record_address_mask)
13904         (s390_record_calc_disp_common, s390_record_calc_disp)
13905         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13906         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13907         (s390_process_record): Moved from s390-linux-tdep.c
13908         (s390_gdbarch_init): Adjust.
13909
13910 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13911
13912         * s390-linux-nat.c (s390-tdep.h): New include.
13913         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13914         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13915         (ALLDEPFILES): Add s390-tdep.c.
13916         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13917         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13918         * s390-tdep.h: ...this.  New file.
13919         * s390-linux-tdep.c (s390-tdep.h): New include.
13920         (_initialize_s390_tdep): Rename to...
13921         (_initialize_s390_linux_tdep): ...this and adjust.
13922         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13923         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13924         s390-tdep.h.
13925         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13926         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13927         (s390_is_partial_instruction, s390_software_single_step)
13928         (is_non_branch_ril, s390_displaced_step_copy_insn)
13929         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13930         (s390_prologue_data, s390_addr, s390_store, s390_load)
13931         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13932         (s390_register_call_saved, s390_guess_tracepoint_registers)
13933         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13934         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13935         (s390_pseudo_register_name, s390_pseudo_register_type)
13936         (s390_pseudo_register_read, s390_pseudo_register_write)
13937         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13938         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13939         (s390_addr_bits_remove, s390_address_class_type_flags)
13940         (s390_address_class_type_flags_to_name)
13941         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13942         (s390_function_arg_float, s390_function_arg_vector)
13943         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13944         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13945         (s390_frame_align, s390_register_return_value, s390_return_value)
13946         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13947         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13948         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13949         (s390_trad_frame_prev_register, s390_unwind_cache)
13950         (s390_prologue_frame_unwind_cache)
13951         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13952         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13953         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13954         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13955         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13956         (s390_frame_base_address, s390_local_base_address)
13957         (s390_frame_base, s390_gcc_target_options)
13958         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13959         (s390_validate_reg_range, s390_tdesc_valid)
13960         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13961         * s390-tdep.c: ...this.  New file.
13962
13963 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13964
13965         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13966         (s390_process_record, s390_gdbarch_tdep_alloc)
13967         (s390_linux_init_abi_any): Use/set new hook.
13968
13969 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13970
13971         * s390-linux-tdep.c (osabi.h): New include.
13972         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13973         (s390_linux_init_abi_any): New functions.
13974         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13975
13976 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13977
13978         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13979         tdesc_has_registers check
13980
13981 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13982
13983         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13984         (s390_validate_reg_range): New macro.
13985         (s390_gdbarch_init): Adjust.
13986
13987 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13988
13989         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13990         (s390_gdbarch_tdep_alloc): Adjust.
13991         (s390_gdbarch_init): Adjust.
13992
13993 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13994
13995         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13996         <have_tdb>: Change type to bool.
13997         (s390_gdbarch_tdep_alloc): Adjust.
13998         (s390_gdbarch_init): Adjust.
13999
14000 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14001
14002         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14003         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14004         (s390_gdbarch_tdep_alloc): New function.
14005         (s390_gdbarch_init): Allocate tdep at start and use its fields
14006         instead of separate variables.
14007
14008 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14009
14010         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14011         when looking for cached gdbarch and add comment for remaining.
14012
14013 2018-01-22  Pedro Alves  <palves@redhat.com>
14014             Sergio Durigan Junior  <sergiodj@redhat.com>
14015
14016         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14017         case.
14018
14019 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14020
14021         * MAINTAINERS: Update my company e-mail address.
14022
14023 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14024
14025         * regcache.c (cooked_write_test): New function.
14026         (_initialize_regcache): Register the test.
14027
14028 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14029
14030         * ia64-tdep.c (ia64_pseudo_register_read): Call
14031         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14032         * m32c-tdep.c (m32c_cat_read): Likewise.
14033         (m32c_r3r2r1r0_read): Likewise.
14034         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14035         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14036
14037 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14038
14039         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14040         method raw_read instead of regcache_raw_read.
14041         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14042         * arm-tdep.c (arm_neon_quad_read): Likewise.
14043         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14044         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14045         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14046         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14047         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14048         (i386_pseudo_register_read_into_value): Likewise.
14049         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14050         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14051         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14052         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14053         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14054         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14055         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14056         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14057         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14058
14059 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14060
14061         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14062         * configure.tgt: Remove target mt.
14063         * mt-tdep.c: Remove.
14064         * regcache.c (cooked_read_test): Remove the check for mt.
14065
14066 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14067
14068         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14069         instead of gdbarch_pseudo_register_read_value.
14070
14071 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14072
14073         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14074         language is Ada.
14075
14076 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14077
14078         * linespec.c (create_sals_line_offset): Remove code that preserved
14079         the symtab_and_line's line number.
14080
14081 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14082
14083         * varobj.c (varobj_create): Don't set valid_block when creating a
14084         floating varobj.
14085
14086 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14087
14088         * varobj.c (varobj_create): Remove out of date comment.
14089
14090 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14091
14092         PR mi/20395
14093         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14094         updating innermost block.
14095         * parse.c (innermost_block_tracker::update): Take extra type
14096         parameter, and check types match before updating innermost block.
14097         (write_dollar_variable): Update innermost block for registers.
14098         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14099         (innermost_block_tracker::innermost_block_tracker): Initialise
14100         m_types member.
14101         (innermost_block_tracker::reset): Take type parameter.
14102         (innermost_block_tracker::update): Take type parameter, and pass
14103         type through as needed.
14104         (innermost_block_tracker::m_types): New member.
14105         * varobj.c (varobj_create): Pass type when reseting innermost
14106         block.
14107
14108 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14109
14110         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14111         * ada-lang.c (resolve_subexp): Likewise.
14112         * breakpoint.c (set_breakpoint_condition) Likewise.
14113         (watch_command_1) Likewise.
14114         * c-exp.y (variable): Likewise.
14115         * d-exp.y (PrimaryExpression): Likewise.
14116         * f-exp.y (variable): Likewise.
14117         * go-exp.y (variable): Likewise.
14118         * m2-exp.y (variable): Likewise.
14119         * objfiles.c (objfile::~objfile): Likewise.
14120         * p-exp.y (variable): Likewise.
14121         * parse.c (innermost_block): Change type.
14122         * parser-defs.h (class innermost_block_tracker): New.
14123         (innermost_block): Change to innermost_block_tracker.
14124         * printcmd.c (display_command): Switch to innermost_block API.
14125         (do_one_display): Likewise.
14126         * rust-exp.y (do_one_display): Likewise.
14127         * symfile.c (clear_symtab_users): Likewise.
14128         * varobj.c (varobj_create): Switch to innermost_block API, replace
14129         use of innermost_block with block stored on varobj object.
14130
14131 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14132
14133         * expression.h (innermost_block): Remove declaration.
14134         * varobj.c: Add 'parser-defs.h' include.
14135
14136 2018-01-19  Tom Tromey  <tom@tromey.com>
14137
14138         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14139         symbols in the static and global blocks.
14140
14141 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14142
14143         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14144         gdb_ptrace.h, and move including gdb_wait.h ...
14145         * nat/linux-ptrace.h: ... to here.
14146
14147 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14148
14149         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14150         inf_ptrace_detach_success.
14151         (inf_ptrace_detach_success): Add inferior parameter, use it
14152         instead of inferior_ptid, pass it to detach_inferior.
14153         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14154         parameter.
14155         * inferior.c (detach_inferior): Add overload that takes an
14156         inferior object.
14157         * inferior.h (detach_inferior): Likewise.
14158         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14159         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14160         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14161
14162 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14163
14164         * target.h (struct target_ops) <to_detach>: Add inferior
14165         parameter.
14166         (target_detach): Likewise.
14167         * target.c (dispose_inferior): Pass inferior down.
14168         (target_detach): Pass inferior down.  Assert that it is equal to
14169         the current inferior.
14170         * aix-thread.c (aix_thread_detach): Pass inferior down.
14171         * corefile.c (core_file_command): Pass current_inferior() down.
14172         * corelow.c (core_detach): Add inferior parameter.
14173         * darwin-nat.c (darwin_detach): Likewise.
14174         * gnu-nat.c (gnu_detach): Likewise.
14175         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14176         * infcmd.c (detach_command): Pass current_inferior() down to
14177         target_detach.
14178         * infrun.c (follow_fork_inferior): Pass parent_inf to
14179         target_detach.
14180         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14181         target_detach.
14182         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14183         * linux-thread-db.c (thread_db_detach): Likewise.
14184         * nto-procfs.c (procfs_detach): Likewise.
14185         * procfs.c (procfs_detach): Likewise.
14186         * record.c (record_detach): Likewise.
14187         * record.h (struct inferior): Forward-declare.
14188         (record_detach): Add inferior parameter.
14189         * remote-sim.c (gdbsim_detach): Likewise.
14190         * remote.c (remote_detach_1): Likewise.
14191         (remote_detach): Likewise.
14192         (extended_remote_detach): Likewise.
14193         * sol-thread.c (sol_thread_detach): Likewise.
14194         * target-debug.h (target_debug_print_inferior_p): New macro.
14195         * target-delegates.c: Re-generate.
14196         * top.c (kill_or_detach): Pass inferior down to target_detach.
14197         * windows-nat.c (windows_detach): Add inferior parameter.
14198
14199 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14200
14201         * target.h (struct target_ops) <to_detach>: Remove args
14202         parameter.
14203         (target_detach): Likewise.
14204         * target.c (dispose_inferior): Adjust.
14205         (target_detach): Remove args parameter, adjust.
14206         * aix-thread.c (aix_thread_detach): Adjust.
14207         * corefile.c (core_file_command): Adjust.
14208         * corelow.c (core_detach): Adjust.
14209         * darwin-nat.c (darwin_detach): Adjust.
14210         * gnu-nat.c (gnu_detach): Adjust.
14211         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14212         * infcmd.c (detach_command): Adjust
14213         * infrun.c (follow_fork_inferior): Adjust.
14214         (handle_vfork_child_exec_or_exit): Adjust.
14215         * linux-fork.c (linux_fork_detach): Remove args parameter.
14216         * linux-fork.h (linux_fork_detach): Likewise.
14217         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14218         * linux-thread-db.c (thread_db_detach): Likewise.
14219         * nto-procfs.c (procfs_detach): Likewise.
14220         * procfs.c (procfs_detach): Likewise.
14221         (do_detach): Remove signo parameter.
14222         * record.c (record_detach): Remove args parameter.
14223         * record.h (record_detach): Likewise.
14224         * remote-sim.c (gdbsim_detach): Likewise.
14225         * remote.c (remote_detach_1): Likewise.
14226         (remote_detach): Likewise.
14227         (extended_remote_detach): Likewise.
14228         * sol-thread.c (sol_thread_detach): Likewise.
14229         * target-delegates.c: Re-generate.
14230         * top.c (struct qt_args) <args>: Remove field.
14231         (kill_or_detach): Don't pass args.
14232         (quit_force): Don't set args.
14233         * windows-nat.c (windows_detach): Remove args parameter.
14234
14235 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14236
14237         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14238         (arm_linux_init_abi): Install it.
14239
14240 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14241
14242         * osabi.c (gdb_osabi_names): Extend the regexp for
14243         arm-linux-gnueabihf.
14244
14245 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14246
14247         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14248         m_abbrevs.
14249         (abbrev_table::add_abbrev): Update.
14250         (abbrev_table::lookup_abbrev): Update.
14251
14252 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14253
14254         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14255
14256 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14257
14258         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14259         to "std::string".
14260
14261 2018-01-17  Tom Tromey  <tom@tromey.com>
14262
14263         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14264
14265 2018-01-17  Tom Tromey  <tom@tromey.com>
14266
14267         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14268         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14269         (create_array_type_with_stride): Update.
14270         * dwarf2read.c (set_die_type): Update.
14271
14272 2018-01-17  Tom Tromey  <tom@tromey.com>
14273
14274         * dwarf2read.c (delayed_method_info): Remove typedef.
14275         (dwarf2_cu::method_info): Now a std::vector.
14276         (add_to_method_list): Update.
14277         (free_delayed_list): Remove.
14278         (compute_delayed_physnames): Update.
14279         (process_full_comp_unit, process_full_type_unit): Clear the method
14280         list.  Remove cleanups.
14281         (psymtab_include_file_name): Add name_holder parameter.  Use
14282         unique_xmalloc_ptr.
14283         (dwarf_decode_lines): Update.
14284
14285 2018-01-17  Tom Tromey  <tom@tromey.com>
14286             Simon Marchi  <simon.marchi@ericsson.com>
14287
14288         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14289         (dwarf2_per_objfile::free_cached_comp_units)
14290         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14291         (init_cutu_and_read_dies_no_follow): Update.
14292         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14293         (dwarf2_cu::~dwarf2_cu): New.
14294         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14295         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14296
14297 2018-01-17  Tom Tromey  <tom@tromey.com>
14298             Simon Marchi  <simon.marchi@ericsson.com>
14299
14300         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14301         (struct die_reader_specs) <abbrev_table>: New member.
14302         (struct abbrev_table): Add constructor.
14303         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14304         <abbrev_obstack>: Now an auto_obstack.
14305         (abbrev_table_up): New typedef.
14306         (init_cu_die_reader): Add abbrev_table parameter.
14307         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14308         Add result_dwo_abbrev_table.
14309         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14310         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14311         Update.
14312         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14313         parameter.
14314         (skip_children): Update.
14315         (abbrev_table::alloc_abbrev): Rename from
14316         abbrev_table_alloc_abbrev.
14317         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14318         (abbrev_table::lookup_abbrev): Rename from
14319         abbrev_table_lookup_abbrev.
14320         (abbrev_table_read_table): Return abbrev_table_up.
14321         (abbrev_table_free, abbrev_table_free_cleanup)
14322         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14323         (load_partial_dies): Update.
14324
14325 2018-01-17  Tom Tromey  <tom@tromey.com>
14326
14327         * dwarf2read.c (dwarf2_compute_name): Update comment.
14328         (read_func_scope, read_variable): Update.
14329         (new_symbol): Remove.
14330         (new_symbol_full): Rename to new_symbol.
14331
14332 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14333
14334         PR gdb/16577
14335         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14336         a warning instead of throwing an error, set section size to 0 and return
14337         NULL.
14338         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14339
14340 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14341
14342         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14343         std::string.
14344         (linux_ptrace_attach_fail_reason_string): Likewise.
14345         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14346         Likewise.
14347         (linux_ptrace_attach_fail_reason_string): Likewise.
14348         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14349
14350 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14351
14352         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14353
14354 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14355
14356         PR gdb/21559
14357         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14358         checking for fs_base/gs_base fields in struct user_regs_struct.
14359         * configure: Regenerate.
14360
14361 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14362
14363         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14364         function.
14365         (aarch64_linux_init_abi): Install it to gdbarch hook
14366         gcc_target_options.
14367
14368 2018-01-15  Pedro Alves  <palves@redhat.com>
14369
14370         * common/signals-state-save-restore.c
14371         (save_original_signals_state): Fix typos.
14372
14373 2017-01-12  Tom Tromey  <tom@tromey.com>
14374             Sergio Durigan Junior  <sergiodj@redhat.com>
14375
14376         * Makefile.in (install-only): Install gdb-add-index.
14377
14378 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14379
14380         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14381
14382 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14383
14384         * infrun.c (keep_going_pass_signal): Clear step-over info when
14385         insert_breakpoints fails.
14386
14387 2018-01-11  Pedro Alves  <palves@redhat.com>
14388
14389         PR gdb/22583
14390         * infrun.c (resume): Rename to ...
14391         (resume_1): ... this.
14392         (resume): Reimplement as wrapper around resume_1.
14393
14394 2018-01-11  Pedro Alves  <palves@redhat.com>
14395
14396         PR remote/22597
14397         * remote.c (remote_parse_stop_reply): Default to the last-set
14398         general thread instead of to 'magic_null_ptid'.
14399
14400 2018-01-10  Pedro Alves  <palves@redhat.com>
14401
14402         * language.h (language_get_symbol_name_matcher): Rename ...
14403         (get_symbol_name_matcher): ... this.
14404         * language.c (language_get_symbol_name_matcher): Ditto.
14405         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14406         callers adjusted.
14407
14408 2018-01-10  Pedro Alves  <palves@redhat.com>
14409
14410         PR gdb/22670
14411         * dwarf2read.c
14412         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14413         Adjust to use language_get_symbol_name_matcher instead of
14414         language_defn::la_get_symbol_name_matcher.
14415         * language.c (language_get_symbol_name_matcher): If in Ada mode
14416         and the lookup name is a verbatim match, return Ada's matcher.
14417         * language.h (language_get_symbol_name_matcher): Adjust comment.
14418         (ada_lookup_name_info::verbatim_p):: New method.
14419
14420 2018-01-10  Pedro Alves  <palves@redhat.com>
14421
14422         PR gdb/22670
14423         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14424         minsym's language is language_auto or language_cplus, pass down
14425         language_ada instead.
14426         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14427
14428 2018-01-10  Pedro Alves  <palves@redhat.com>
14429
14430         PR gdb/22670
14431         * minsyms.c (linkage_name_str): New function.
14432         (iterate_over_minimal_symbols): Use it.
14433
14434 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14435
14436         * NEWS: Document that 'info proc' now works on FreeBSD.
14437
14438 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14439
14440         * configure.ac: Check for kinfo_getfile in libutil.
14441         * configure: Regenerate.
14442         * config.in: Regenerate.
14443         * fbsd-nat.c: Include "fbsd-tdep.h".
14444         (fbsd_fetch_cmdline): New.
14445         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14446         rather than calling error.
14447         (fbsd_info_proc): New.
14448         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14449         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14450         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14451
14452 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14453
14454         * fbsd-nat.c (struct free_deleter): Remove.
14455         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14456
14457 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14458
14459         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14460         NULL for an empty pathname.
14461
14462 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14463
14464         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14465         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14466         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14467         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14468         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14469         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14470         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14471         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14472         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14473         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14474         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14475         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14476         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14477         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14478         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14479
14480 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14481
14482         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14483         (gnu_xfer_auxv): New function.
14484         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14485         TARGET_OBJECT_AUXV.
14486
14487 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14488             Simon Marchi  <simon.marchi@ericsson.com>
14489
14490         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14491         common/selftest.c.
14492         (COMMON_OBS): Remove selftest.o.
14493         * configure.ac: Append selftest-arch.c and common/selftest.c to
14494         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14495         * configure: Re-generated.
14496         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14497         GDB_SELF_TEST.
14498         (maintenance_info_selftests): Likewise.
14499
14500 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14501
14502         * ada-valprint.c (val_print_packed_array_elements): Use
14503         proper number of elements when printing an array indexed
14504         by an enumeration type.
14505
14506 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14507
14508         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14509         (dw2_get_file_names_reader): Adjust.
14510         (lookup_dwo_signatured_type): Adjust.
14511         (lookup_dwp_signatured_type): Adjust.
14512         (lookup_signatured_type): Adjust.
14513         (create_type_unit_group): Adjust.
14514         (get_type_unit_group): Adjust.
14515         (process_psymtab_comp_unit_reader): Adjust.
14516         (build_type_psymtabs_reader): Adjust.
14517         (scan_partial_symbols): Adjust.
14518         (add_partial_symbol): Adjust.
14519         (add_partial_subprogram): Adjust.
14520         (peek_die_abbrev): Adjust.
14521         (fixup_go_packaging): Adjust.
14522         (process_imported_unit_die): Adjust.
14523         (dwarf2_compute_name): Adjust.
14524         (dwarf2_physname): Adjust.
14525         (read_import_statement): Adjust.
14526         (handle_DW_AT_stmt_list): Adjust.
14527         (read_file_scope): Adjust.
14528         (read_func_scope): Adjust.
14529         (read_lexical_block_scope): Adjust.
14530         (read_call_site_scope): Adjust.
14531         (read_variable): Adjust.
14532         (dwarf2_rnglists_process): Adjust.
14533         (dwarf2_ranges_process): Adjust.
14534         (dwarf2_ranges_read): Adjust.
14535         (dwarf2_get_pc_bounds): Adjust.
14536         (dwarf2_record_block_ranges): Adjust.
14537         (dwarf2_add_field): Adjust.
14538         (dwarf2_add_member_fn): Adjust.
14539         (read_structure_type): Adjust.
14540         (process_structure_scope): Adjust.
14541         (read_enumeration_type): Adjust.
14542         (read_array_type): Adjust.
14543         (mark_common_block_symbol_computed): Adjust.
14544         (read_common_block): Adjust.
14545         (read_namespace_type): Adjust.
14546         (read_namespace): Adjust.
14547         (read_module_type): Adjust.
14548         (read_tag_pointer_type): Adjust.
14549         (read_tag_ptr_to_member_type): Adjust.
14550         (read_tag_string_type): Adjust.
14551         (read_subroutine_type): Adjust.
14552         (read_typedef): Adjust.
14553         (read_base_type): Adjust.
14554         (attr_to_dynamic_prop): Adjust.
14555         (read_subrange_type): Adjust.
14556         (read_unspecified_type): Adjust.
14557         (dwarf2_read_abbrevs): Adjust.
14558         (load_partial_dies): Adjust.
14559         (read_partial_die): Adjust.
14560         (find_partial_die): Adjust.
14561         (guess_partial_die_structure_name): Adjust.
14562         (fixup_partial_die): Adjust.
14563         (read_attribute_value): Adjust.
14564         (read_addr_index): Adjust.
14565         (read_addr_index_from_leb128): Adjust.
14566         (read_str_index): Adjust.
14567         (dwarf2_string_attr): Adjust.
14568         (get_debug_line_section): Adjust.
14569         (dwarf_decode_line_header): Adjust.
14570         (lnp_state_machine::check_line_address): Adjust.
14571         (dwarf_decode_lines_1): Adjust.
14572         (dwarf_decode_lines): Adjust.
14573         (dwarf2_start_symtab): Adjust.
14574         (var_decode_location): Adjust.
14575         (new_symbol_full): Adjust.
14576         (dwarf2_const_value_data): Adjust.
14577         (dwarf2_const_value_attr): Adjust.
14578         (dwarf2_const_value): Adjust.
14579         (die_type): Adjust.
14580         (die_containing_type): Adjust.
14581         (build_error_marker_type): Adjust.
14582         (lookup_die_type): Adjust.
14583         (guess_full_die_structure_name): Adjust.
14584         (anonymous_struct_prefix): Adjust.
14585         (determine_prefix): Adjust.
14586         (dwarf2_name): Adjust.
14587         (follow_die_ref_or_sig): Adjust.
14588         (follow_die_offset): Adjust.
14589         (follow_die_ref): Adjust.
14590         (follow_die_sig_1): Adjust.
14591         (follow_die_sig): Adjust.
14592         (get_signatured_type): Adjust.
14593         (get_DW_AT_signature_type): Adjust.
14594         (decode_locdesc): Adjust.
14595         (dwarf_decode_macros): Adjust.
14596         (cu_debug_loc_section): Adjust.
14597         (fill_in_loclist_baton): Adjust.
14598         (dwarf2_symbol_mark_computed): Adjust.
14599         (init_one_comp_unit): Don't assign
14600         dwarf2_cu::dwarf2_per_objfile.
14601         (set_die_type): Adjust.
14602
14603 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14604
14605         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14606         <dwarf2_per_objfile>: New field.
14607         (dwarf2_per_objfile): Remove global.
14608         (get_dwarf2_per_objfile): New function.
14609         (set_dwarf2_per_objfile): New function.
14610         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14611         dwarf2_per_objfile.
14612         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14613         (read_abbrev_offset): Likewise.
14614         (read_indirect_string): Likewise.
14615         (read_indirect_line_string): Likewise.
14616         (read_indirect_string_at_offset): Likewise.
14617         (read_indirect_string_from_dwz): Likewise.
14618         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14619         dwarf2_per_objfile.
14620         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14621         (create_all_comp_units): Change objfile parameter to
14622         dwarf2_per_objfile.
14623         (create_all_type_units): Likewise.
14624         (process_queue): Add dwarf2_per_objfile parameter.
14625         (read_and_check_comp_unit_head): Likewise.
14626         (lookup_dwo_unit_in_dwp): Likewise.
14627         (get_dwp_file): Likewise.
14628         (process_cu_includes): Likewise.
14629         (struct free_dwo_file_cleanup_data): New struct.
14630         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14631         set_dwarf2_per_objfile.
14632         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14633         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14634         context, adjust calls.
14635         (dw2_instantiate_symtab): Likewise.
14636         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14637         (dw2_get_cu): Likewise.
14638         (create_cu_from_index_list): Change objfile parameter to
14639         dwarf2_per_objfile.
14640         (create_cus_from_index_list): Get dwarf2_per_objfile from
14641         context, adjust calls.
14642         (create_cus_from_index): Likewise.
14643         (create_signatured_type_table_from_index): Change objfile
14644         parameter to dwarf2_per_objfile.
14645         (create_signatured_type_table_from_debug_names): Change objfile
14646         parameter to dwarf2_per_objfile.
14647         (create_addrmap_from_index): Likewise.
14648         (create_addrmap_from_aranges): Likewise.
14649         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14650         (dw2_setup): Remove.
14651         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14652         context.
14653         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14654         get_dwarf2_per_objfile.
14655         (dw2_forget_cached_source_info): Likewise.
14656         (dw2_map_symtabs_matching_filename): Likewise.
14657         (struct dw2_symtab_iterator) <index>: Remove.
14658         <dwarf2_per_objfile>: New field.
14659         (dw2_symtab_iter_init): Replace index parameter with
14660         dwarf2_per_objfile.
14661         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14662         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14663         (dw2_print_stats): Likewise.
14664         (dw2_dump): Likewise.
14665         (dw2_expand_symtabs_for_function): Likewise.
14666         (dw2_expand_all_symtabs): Likewise.
14667         (dw2_expand_symtabs_with_fullname): Likewise.
14668         (dw2_expand_marked_cus): Replace index and objfile parameters
14669         with dwarf2_per_objfile.
14670         (dw_expand_symtabs_matching_file_matcher): Add
14671         dwarf2_per_objfile parameter and adjust calls.
14672         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14673         adjust calls.
14674         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14675         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14676         adjust calls.
14677         (create_cus_from_debug_names_list): Replace objfile parameter
14678         with dwarf2_per_objfile and adjust calls.
14679         (create_cus_from_debug_names): Likewise.
14680         (dwarf2_read_debug_names): Likewise.
14681         (mapped_debug_names::namei_to_name): Adjust call.
14682         (dw2_debug_names_iterator::next): Likewise.
14683         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14684         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14685         (dw2_debug_names_dump): Likewise.
14686         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14687         (dw2_debug_names_expand_symtabs_matching): Likewise.
14688         (dwarf2_initialize_objfile): Likewise.
14689         (dwarf2_build_psymtabs): Likewise.
14690         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14691         this_cu.
14692         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14693         (read_and_check_comp_unit_head): Likewise.
14694         (read_abbrev_offset): Likewise.
14695         (create_debug_type_hash_table): Likewise.
14696         (create_debug_types_hash_table): Likewise.
14697         (create_all_type_units): Replace objfile parameter with
14698         dwarf2_per_objfile.
14699         (add_type_unit): Add dwarf2_per_objfile parameter.
14700         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14701         with dwarf2_per_objfile.
14702         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14703         (lookup_dwp_signatured_type): Likewise.
14704         (lookup_signatured_type): Likewise.
14705         (read_cutu_die_from_dwo): Likewise.
14706         (init_tu_and_read_dwo_dies): Likewise.
14707         (init_cutu_and_read_dies): Likewise.
14708         (init_cutu_and_read_dies_no_follow): Likewise.
14709         (allocate_type_unit_groups_table): Add objfile parameter.
14710         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14711         (get_type_unit_group): Likewise.
14712         (process_psymtab_comp_unit): Update call.
14713         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14714         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14715         (print_tu_stats): Likewise.
14716         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14717         in void* parameter.
14718         (build_type_psymtabs): Change objfile parameter to
14719         dwarf2_per_objfile.
14720         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14721         passed in void* parameter.
14722         (process_skeletonless_type_units): Change objfile parameter to
14723         dwarf2_per_objfile.
14724         (set_partial_user): Likewise.
14725         (dwarf2_build_psymtabs_hard): Likewise.
14726         (read_comp_units_from_section): Likewise.
14727         (create_all_comp_units): Likewise.
14728         (scan_partial_symbols): Update calls.
14729         (add_partial_symbol): Likewise.
14730         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14731         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14732         (process_queue): Add dwarf2_per_objfile parameter.
14733         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14734         (compute_compunit_symtab_includes): Likewise.
14735         (process_cu_includes): Add dwarf2_per_objfile parameter.
14736         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14737         (process_full_type_unit): Likewise.
14738         (process_imported_unit_die): Update call.
14739         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14740         (read_file_scope): Likewise.
14741         (allocate_dwo_file_hash_table): Add objfile parameter.
14742         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14743         (create_cus_hash_table): Likewise.
14744         (create_dwp_hash_table): Likewise.
14745         (create_dwo_unit_in_dwp_v1): Likewise.
14746         (create_dwp_v2_section): Likewise.
14747         (create_dwo_unit_in_dwp_v2): Likewise.
14748         (lookup_dwo_unit_in_dwp): Likewise.
14749         (try_open_dwop_file): Likewise.
14750         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14751         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14752         cleanup to include a reference to dwarf2_per_objfile.
14753         (open_dwp_file): Add dwarf2_per_objfile parameter.
14754         (open_and_init_dwp_file): Likewise.
14755         (get_dwp_file): Likewise.
14756         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14757         (queue_and_load_all_dwo_tus): Update call.
14758         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14759         data.
14760         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14761         (dwarf2_ranges_process): Likewise.
14762         (dwarf2_get_pc_bounds): Likewise.
14763         (mark_common_block_symbol_computed): Likewise.
14764         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14765         (dwarf2_read_abbrevs): Update call.
14766         (read_partial_die): Use dwarf2_per_objfile from cu.
14767         (find_partial_die): Likewise.
14768         (fixup_partial_die): Likewise.
14769         (read_attribute_value): Likewise.
14770         (read_indirect_string_at_offset_from): Add objfile parameter.
14771         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14772         parameter.
14773         (read_indirect_string_from_dwz): Add objfile parameter.
14774         (read_indirect_string): Add objfile parameter.
14775         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14776         (read_addr_index): Use dwarf2_per_objfile from cu.
14777         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14778         call dw2_setup.
14779         (read_str_index): Use dwarf2_per_objfile from cu.
14780         (get_debug_line_section): Likewise.
14781         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14782         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14783         (new_symbol_full): Use dwarf2_per_objfile from cu.
14784         (build_error_marker_type): Likewise.
14785         (lookup_die_type): Likewise.
14786         (determine_prefix): Likewise.
14787         (follow_die_offset): Likewise.
14788         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14789         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14790         (dwarf2_fetch_die_type_sect_off): Likewise.
14791         (dwarf2_get_die_type): Likewise.
14792         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14793         (get_signatured_type): Likewise.
14794         (get_DW_AT_signature_type): Likewise.
14795         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14796         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14797         (cu_debug_loc_section): Likewise.
14798         (fill_in_loclist_baton): Likewise.
14799         (dwarf2_symbol_mark_computed): Likewise.
14800         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14801         dwarf2_per_objfile.
14802         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14803         parameter.
14804         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14805         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14806         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14807         (set_die_type): Use dwarf2_free_objfile from cu.
14808         (get_die_type_at_offset): Likewise.
14809         (dwarf2_per_objfile_free): Don't assign global variable.
14810         (debug_names) <constructor>: Add dwarf2_per_objfile
14811         parameter, update m_debugstrlookup construction.
14812         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14813         parameter.
14814         <m_dwarf2_per_objfile>: New field.
14815         <lookup>: Use m_dwarf2_per_objfile.
14816         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14817         (psyms_seen_size): Likewise.
14818         (write_gdbindex): Replace objfile parameter with
14819         dwarf2_per_objfile.
14820         (write_debug_names): Likewise.
14821         (write_psymtabs_to_index): Likewise.
14822         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14823         calls.
14824
14825 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14826
14827         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14828         <dwarf2_per_objfile>: New field.
14829         (struct dwarf2_per_cu_data) <objfile>: Remove.
14830         <dwarf2_per_objfile>: New field.
14831         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14832         of objfile.
14833         (create_signatured_type_table_from_index): Likewise.
14834         (create_debug_type_hash_table): Likewise.
14835         (fill_in_sig_entry_from_dwo_entry): Likewise.
14836         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14837         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14838         objfile.
14839         (create_partial_symtab): Access objfile through
14840         dwarf2_per_objfile.
14841         (process_psymtab_comp_unit_reader): Likewise.
14842         (read_comp_units_from_section): Likewise.
14843         (scan_partial_symbols): Likewise.
14844         (add_partial_symbol): Likewise.
14845         (add_partial_subprogram): Likewise.
14846         (peek_die_abbrev): Likewise.
14847         (fixup_go_packaging): Likewise.
14848         (process_full_comp_unit): Likewise.
14849         (process_full_type_unit): Likewise.
14850         (process_imported_unit_die): Likewise.
14851         (dwarf2_compute_name): Likewise.
14852         (dwarf2_physname): Likewise.
14853         (read_import_statement): Likewise.
14854         (create_cus_hash_table): Assign dwarf2_physname instead of
14855         objfile.
14856         (read_func_scope): Access objfile through dwarf2_per_objfile.
14857         (read_lexical_block_scope): Likewise.
14858         (read_call_site_scope): Likewise.
14859         (read_variable): Likewise.
14860         (dwarf2_rnglists_process): Likewise.
14861         (dwarf2_ranges_process): Likewise.
14862         (dwarf2_ranges_read): Likewise.
14863         (dwarf2_record_block_ranges): Likewise.
14864         (dwarf2_add_field): Likewise.
14865         (dwarf2_add_member_fn): Likewise.
14866         (read_structure_type): Likewise.
14867         (process_structure_scope): Likewise.
14868         (read_enumeration_type): Likewise.
14869         (read_array_type): Likewise.
14870         (read_common_block): Likewise.
14871         (read_namespace_type): Likewise.
14872         (read_namespace): Likewise.
14873         (read_module_type): Likewise.
14874         (read_tag_pointer_type): Likewise.
14875         (read_tag_ptr_to_member_type): Likewise.
14876         (read_tag_string_type): Likewise.
14877         (read_subroutine_type): Likewise.
14878         (read_typedef): Likewise.
14879         (read_base_type): Likewise.
14880         (attr_to_dynamic_prop): Likewise.
14881         (read_subrange_type): Likewise.
14882         (read_unspecified_type): Likewise.
14883         (load_partial_dies): Likewise.
14884         (read_partial_die): Likewise.
14885         (find_partial_die): Likewise.
14886         (guess_partial_die_structure_name): Likewise.
14887         (fixup_partial_die): Likewise.
14888         (read_attribute_value): Likewise.
14889         (read_addr_index_from_leb128): Likewise.
14890         (dwarf2_read_addr_index): Likewise.
14891         (dwarf2_string_attr): Likewise.
14892         (lnp_state_machine::check_line_address): Likewise.
14893         (dwarf_decode_lines_1): Likewise.
14894         (dwarf_decode_lines): Likewise.
14895         (dwarf2_start_symtab): Likewise.
14896         (var_decode_location): Likewise.
14897         (new_symbol_full): Likewise.
14898         (dwarf2_const_value_data): Likewise.
14899         (dwarf2_const_value_attr): Likewise.
14900         (dwarf2_const_value): Likewise.
14901         (die_type): Likewise.
14902         (die_containing_type): Likewise.
14903         (lookup_die_type): Likewise.
14904         (guess_full_die_structure_name): Likewise.
14905         (anonymous_struct_prefix): Likewise.
14906         (dwarf2_name): Likewise.
14907         (follow_die_ref_or_sig): Likewise.
14908         (follow_die_offset): Likewise.
14909         (follow_die_ref): Likewise.
14910         (dwarf2_fetch_die_loc_sect_off): Likewise.
14911         (dwarf2_fetch_constant_bytes): Likewise.
14912         (dwarf2_fetch_die_type_sect_off): Likewise.
14913         (dwarf2_get_die_type): Likewise.
14914         (follow_die_sig): Likewise.
14915         (decode_locdesc): Likewise.
14916         (dwarf2_per_cu_objfile): Likewise.
14917         (dwarf2_per_cu_text_offset): Likewise.
14918         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14919         objfile.
14920         (set_die_type): Access objfile through
14921         dwarf2_per_objfile.
14922
14923 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14924
14925         * valprint.c (converted_character_d): Remove typedef.
14926         (DEF_VEC_O (converted_character_d)): Remove.
14927         (count_next_character): Use std::vector.
14928         (print_converted_chars_to_obstack): Likewise.
14929         (generic_printstr): Likewise.
14930
14931 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14932
14933         * xml-support.h (struct gdb_xml_value): Add constructor.
14934         <value>: Change type to unique_xmalloc_ptr.
14935         (gdb_xml_value_s): Remove typedef.
14936         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14937         (gdb_xml_element_start_handler): Change parameter type to
14938         std::vector.
14939         (xml_find_attribute): Likewise.
14940         * xml-support.c (xml_find_attribute): Change parameter type to
14941         std::vector and adjust.
14942         (gdb_xml_values_cleanup): Remove.
14943         (gdb_xml_parser::start_element): Adjust to std::vector.
14944         (xinclude_start_include): Change paraeter type to std::vector
14945         and adjust.
14946         * btrace.c (check_xml_btrace_version): Likewise.
14947         (parse_xml_btrace_block): Likewise.
14948         (parse_xml_btrace_pt_config_cpu): Likewise.
14949         (parse_xml_btrace_pt): Likewise.
14950         (parse_xml_btrace_conf_bts): Likewise.
14951         (parse_xml_btrace_conf_pt): Likewise.
14952         * memory-map.c (memory_map_start_memory): Likewise.
14953         (memory_map_start_property): Likewise.
14954         * osdata.c (osdata_start_osdata): Likewise.
14955         (osdata_start_item): Likewise.
14956         (osdata_start_column): Likewise.
14957         * remote.c (start_thread): Likewise.
14958         * solib-aix.c (library_list_start_library): Likewise.
14959         (library_list_start_list): Likewise.
14960         * solib-svr4.c (library_list_start_library): Likewise.
14961         (svr4_library_list_start_list): Likewise.
14962         * solib-target.c (library_list_start_segment): Likewise.
14963         (library_list_start_section): Likewise.
14964         (library_list_start_library): Likewise.
14965         (library_list_start_list): Likewise.
14966         * tracepoint.c (traceframe_info_start_memory): Likewise.
14967         (traceframe_info_start_tvar): Likewise.
14968         * xml-syscall.c (syscall_start_syscall): Likewise.
14969         * xml-tdesc.c (tdesc_start_target): Likewise.
14970         (tdesc_start_feature): Likewise.
14971         (tdesc_start_reg): Likewise.
14972         (tdesc_start_union): Likewise.
14973         (tdesc_start_struct): Likewise.
14974         (tdesc_start_flags): Likewise.
14975         (tdesc_start_enum): Likewise.
14976         (tdesc_start_field): Likewise.
14977         (tdesc_start_enum_value): Likewise.
14978         (tdesc_start_vector): Likewise.
14979
14980 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14981
14982         * extension.h (struct xmethod_worker) <clone>: Remove.
14983         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14984         Remove.
14985         (python_xmethod_worker::clone): Remove.
14986         * valops.c (find_overload_match): Use std::move instead of
14987         clone.
14988
14989 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14990
14991         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14992         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14993         <free_xmethod_worker_data>: Remove.
14994         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14995         <get_xmethod_arg_types>: Remove.
14996         <get_xmethod_result_type>: Remove.
14997         <invoke_xmethod>: Remove.
14998         * extension.c (new_xmethod_worker): Remove.
14999         (clone_xmethod_worker): Remove.
15000         (get_matching_xmethod_workers): Return void, pass std::vector by
15001         pointer.
15002         (get_xmethod_arg_types): Rename to...
15003         (xmethod_worker::get_arg_types): ... this, and adjust.
15004         (get_xmethod_result_type): Rename to...
15005         (xmethod_worker::get_result_type): ... this, and adjust.
15006         (invoke_xmethod): Remove.
15007         (free_xmethod_worker): Remove.
15008         (free_xmethod_worker_vec): Remove.
15009         * extension.h (enum ext_lang_rc): Move here from
15010         extension-priv.h.
15011         (struct xmethod_worker): Add constructor and destructor.
15012         <data>: Remove.
15013         <value>: Remove.
15014         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15015         virtual pure methods.
15016         <get_arg_types, get_result_type>: New methods.
15017         (xmethod_worker_ptr): Remove typedef.
15018         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15019         (xmethod_worker_vec): Remove typedef.
15020         (xmethod_worker_up): New typedef.
15021         (invoke_xmethod): Remove.
15022         (clone_xmethod_worker): Remove.
15023         (free_xmethod_worker): Remove.
15024         (free_xmethod_worker_vec): Remove.
15025         (get_xmethod_arg_types): Remove.
15026         (get_xmethod_result_type): Remove.
15027         * valops.c (find_method_list): Use std::vector, don't use
15028         intermediate vector.
15029         (value_find_oload_method_list): Use std::vector.
15030         (find_overload_match): Use std::vector.
15031         (find_oload_champ): Use std::vector.
15032         * value.c (value_free): Use operator delete.
15033         (value_of_xmethod): Rename to...
15034         (value_from_xmethod): ... this.  Don't assign
15035         xmethod_worker::value, take rvalue-reference.
15036         (result_type_of_xmethod): Adjust.
15037         (call_xmethod): Adjust.
15038         * value.h: Include extension.h.
15039         (struct xmethod_worker): Don't forward-declare.
15040         (value_of_xmethod): Rename to...
15041         (value_from_xmethod): ... this, take rvalue-reference.
15042         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15043         (struct python_xmethod_worker): ... this, add constructor and
15044         destructor.
15045         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15046         (gdbpy_free_xmethod_worker_data): Rename to...
15047         (python_xmethod_worker::~python_xmethod_worker): ... this and
15048         adjust.
15049         (gdbpy_clone_xmethod_worker_data): Rename to...
15050         (python_xmethod_worker::clone): ... this and adjust.
15051         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15052         temporary vector.
15053         (gdbpy_get_xmethod_arg_types): Rename to...
15054         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15055         (gdbpy_get_xmethod_result_type): Rename to...
15056         (python_xmethod_worker::do_get_result_type): ... this and
15057         adjust.
15058         (gdbpy_invoke_xmethod): Rename to...
15059         (python_xmethod_worker::invoke): ... this and adjust.
15060         (new_python_xmethod_worker): Rename to...
15061         (python_xmethod_worker::python_xmethod_worker): ... this and
15062         adjust.
15063         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15064         Remove.
15065         (gdbpy_free_xmethod_worker_data): Remove.
15066         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15067         (gdbpy_get_xmethod_arg_types): Remove.
15068         (gdbpy_get_xmethod_result_type): Remove.
15069         (gdbpy_invoke_xmethod): Remove.
15070         * python/python.c (python_extension_ops): Remove obsolete
15071         callbacks.
15072
15073 2018-01-05  Pedro Alves  <palves@redhat.com>
15074
15075         PR gdb/18653
15076         * common/signals-state-save-restore.c
15077         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15078         find a custom handler preinstalled, instead of internal erroring.
15079         But only warn if !quiet.
15080         * common/signals-state-save-restore.h
15081         (save_original_signals_state): New parameter 'quiet'.
15082         * main.c (captured_main_1): Move save_original_signals_state call
15083         after option handling, and pass QUIET.
15084
15085 2018-01-05  Pedro Alves  <palves@redhat.com>
15086
15087         * spu-tdep.c (spu_catch_start): Pass
15088         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15089
15090 2018-01-05  Pedro Alves  <palves@redhat.com>
15091
15092         PR gdb/22670
15093         * ada-lang.c (literal_symbol_name_matcher): New function.
15094         (ada_get_symbol_name_matcher): Use it for
15095         symbol_name_match_type::SEARCH_NAME.
15096         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15097         it down instead of assuming symbol_name_match_type::FULL.
15098         * block.h (block_lookup_symbol): New parameter 'match_type'.
15099         * c-valprint.c (print_unpacked_pointer): Use
15100         lookup_symbol_search_name instead of lookup_symbol.
15101         * compile/compile-object-load.c (get_out_value_type): Pass down
15102         symbol_name_match_type::SEARCH_NAME.
15103         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15104         symbol_name_match_type::FULL.
15105         * cp-support.c (cp_get_symbol_name_matcher): Handle
15106         symbol_name_match_type::SEARCH_NAME.
15107         * infrun.c (insert_exception_resume_breakpoint): Use
15108         lookup_symbol_search_name.
15109         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15110         * psymtab.c (maintenance_check_psymtabs): Use
15111         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15112         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15113         SYMBOL_SEARCH_NAME.
15114         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15115         if symbol_name_match_type::SEARCH_NAME.
15116         (lookup_symbol_in_language): Pass down
15117         symbol_name_match_type::FULL.
15118         (lookup_symbol_search_name): New.
15119         (lookup_language_this): Pass down
15120         symbol_name_match_type::SEARCH_NAME.
15121         (lookup_symbol_aux, lookup_local_symbol): New parameter
15122         'match_type'.  Pass it down.
15123         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15124         (lookup_symbol_search_name): New declaration.
15125         (lookup_symbol_in_block): New 'match_type' parameter.
15126
15127 2018-01-05  Pedro Alves  <palves@redhat.com>
15128
15129         PR gdb/22670
15130         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15131         ada_lookup_symbol.
15132         (ada_lookup_symbol): Reimplement in terms of
15133         ada_lookup_symbol_list, bits factored out from
15134         ada_lookup_encoded_symbol.
15135
15136 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15137
15138         * ada-exp.y (write_object_renaming): When subscripting an array
15139         using a symbol as the index, pass the block in call to
15140         ada_lookup_encoded_symbol when looking that symbol up.
15141
15142 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15143
15144         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15145         TYPE_INDEX_TYPE.
15146
15147 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15148
15149         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15150         the case where VALUE_LVAL (val0) is not lval_memory.
15151
15152 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15153
15154         * ada-valprint.c (print_optional_low_bound): Handle
15155         character-indexed array printing like boolean-indexed array
15156         printing.
15157
15158 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15159
15160         * NEWS: Create a new section for the next release branch.
15161         Rename the section of the current branch, now that it has
15162         been cut.
15163
15164 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15165
15166         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15167         * version.in: Bump version to 8.1.50.DATE-git.
15168
15169 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15170
15171         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15172         Add field.
15173         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15174         Add field.
15175         (default_exception_support_info) <catch_handlers_sym>: Add field.
15176         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15177         (ada_exception_name_addr_1): Add "catch handlers" handling.
15178         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15179         Update all callers.
15180         (create_excep_cond_exprs) <ex>: Add parameter.
15181         (re_set_exception): Update create_excep_cond_exprs call.
15182         (print_it_exception, print_one_exception, print_mention_exception)
15183         (print_recreate_exception): Add "catch handler" handling.
15184         (allocate_location_catch_handlers, re_set_catch_handlers)
15185         (check_status_catch_handlers, print_it_catch_handlers)
15186         (print_one_catch_handlers, print_mention_catch_handlers)
15187         (print_recreate_catch_handlers): New function.
15188         (catch_handlers_breakpoint_ops): New variable.
15189         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15190         Add parameter.  Add "catch handler" handling.
15191         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15192         Add "catch handler" handling.
15193         (ada_exception_catchpoint_cond_string): Add "catch handler"
15194         handling.
15195         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15196         call.
15197         (catch_ada_handlers_command): New function.
15198         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15199         operations structure.
15200         (_initialize_ada_language): Add "catch handlers" command entry.
15201         * NEWS: Document "catch handlers" feature.
15202
15203 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15204
15205         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15206         account when creating the array type of the slice.
15207         (ada_value_slice): Likewise.
15208
15209 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15210
15211         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15212         New enum value.
15213         (create_array_type_with_stride): Add byte_stride_prop parameter.
15214         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15215         New parameter.  Update all callers in this file.
15216         (array_type_has_dynamic_stride): New function.
15217         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15218         of arrays with dynamic byte strides.
15219         * dwarf2read.c (read_array_type): Add support for dynamic
15220         DW_AT_byte_stride attributes.
15221
15222 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15223
15224         * dwarf2read.c (read_unspecified_type): Treat
15225         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15226
15227 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15228
15229         Update copyright year range in all GDB files.
15230
15231 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15232
15233         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15234         and gdb/testsuite/gdb.base/step-line.c.
15235
15236 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15237
15238         * copyright.py (main): Dump the contents of
15239         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15240         even if BY_HAND is empty.
15241
15242 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15243
15244         * top.c (print_gdb_version): Update Copyright year in version
15245         message.
15246
15247 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15248
15249         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15250
15251 For older changes see ChangeLog-2017.
15252 \f
15253 Local Variables:
15254 mode: change-log
15255 left-margin: 8
15256 fill-column: 74
15257 version-control: never
15258 coding: utf-8
15259 End: