Remove DEF_VECs from symtab.h
[external/binutils.git] / gdb / ChangeLog
1 2018-10-26  Tom Tromey  <tom@tromey.com>
2
3         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
4         (compute_compunit_symtab_includes): Update.
5         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
6         (compunit_symtab_ptr): Likewise.
7
8 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
9
10         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
11         default_print_auxv_entry for specific tag values.
12
13 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
14
15         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
16
17 2018-10-26  Jim Wilson  <jimw@sifive.com>
18
19         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
20         (riscv_linux_sigframe_init): Declare.
21         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
22         (riscv_linux_sigframe): New.
23         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
24         (riscv_linux_sigframe_init): Define.
25         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
26
27         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
28         (riscv_isa_flen): Likewise.  Drop static.
29         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
30         (riscv_isa_flen): Likewise.  Declare.
31
32 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
33             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
34
35         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
36         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
37         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
38         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
39         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
40         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
41         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
42         Define.
43         (struct ppc_linux_features) <htm>: New field.
44         (ppc_linux_no_features): Add initializer for htm field.
45         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
46         new tdescs.
47         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
48         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
49         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
50         Define if not already defined.
51         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
52         and rs6000/powerpc-isa207-htm-vsx64l.
53         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
54         rs6000/powerpc-isa207-htm-vsx64l.xml.
55         * features/rs6000/power-htm-spr.xml: New file.
56         * features/rs6000/power-htm-core.xml: New file.
57         * features/rs6000/power64-htm-core.xml: New file.
58         * features/rs6000/power-htm-fpu.xml: New file.
59         * features/rs6000/power-htm-altivec.xml: New file.
60         * features/rs6000/power-htm-vsx.xml: New file.
61         * features/rs6000/power-htm-ppr.xml: New file.
62         * features/rs6000/power-htm-dscr.xml: New file.
63         * features/rs6000/power-htm-tar.xml: New file.
64         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
65         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
66         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
67         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
68         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
69         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
70         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
71         fetch_regset with HTM regsets.
72         (store_register, store_ppc_registers): Call store_regset with HTM
73         regsets.
74         (ppc_linux_nat_target::read_description): Set htm field in the
75         features struct if needed.
76         * ppc-linux-tdep.c: Include
77         features/rs6000/powerpc-isa207-htm-vsx32l.c and
78         features/rs6000/powerpc-isa207-htm-vsx64l.c.
79         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
80         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
81         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
82         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
83         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
84         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
85         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
86         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
87         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
88         (ppc32_linux_ctarregset): New globals.
89         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
90         (ppc_linux_collect_core_cpgrregset): New function.
91         (ppc_linux_iterate_over_regset_sections): Call back with the htm
92         regsets.
93         (ppc_linux_core_read_description): Check if the tm spr section is
94         present and set htm in the features struct.
95         (_initialize_ppc_linux_tdep): Call
96         initialize_tdesc_powerpc_isa207_htm_vsx32l and
97         initialize_tdesc_powerpc_isa207_htm_vsx64l.
98         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
99         Declare.
100         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
101         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
102         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
103         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
104         New fields.
105         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
106         Likewise.
107         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
108         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
109         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
110         New enum fields.
111         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
112         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
113         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
114         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
115         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
116         <PPC_CTAR_REGNUM>: Likewise.
117         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
118         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
119         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
120         (IS_CEFP_PSEUDOREG): Define.
121         (rs6000_register_name): Hide the upper halves of checkpointed VSX
122         registers.  Return names for the checkpointed DFP, VSX, and EFP
123         pseudo registers.
124         (rs6000_pseudo_register_type): Remove initial assert and raise an
125         internal error in the else clause instead.  Return types for the
126         checkpointed DFP, VSX, and EFP pseudo registers.
127         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
128         checkpointed DFP pseudo registers.
129         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
130         checkpointed VSX pseudo registers.
131         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
132         from efpr_pseudo_register_read and
133         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
134         registers.
135         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
136         Handle checkpointed DFP, VSX, and EFP registers.
137         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
138         (efp_ax_pseudo_register_collect): New functions.
139         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
140         register logic to new functions.  Handle checkpointed DFP, VSX,
141         and EFP pseudo registers.
142         (rs6000_gdbarch_init): Look for and validate the htm features.
143         Include checkpointed DFP, VSX and EFP pseudo-registers.
144         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
145         HTM registers.
146
147 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
148
149         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
150         without altivec or fpu.
151
152 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
153             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
154
155         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
156         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
157         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
158         Define if not already defined.
159         * features/rs6000/power-ebb.xml: New file.
160         * features/rs6000/power-linux-pmu.xml: New file.
161         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
162         features.
163         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
164         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
165         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
166         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
167         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
168         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
169         fetch_regset with ebb and pmu regsets.
170         (store_register, store_ppc_registers): Call store_regset with ebb
171         and pmu regsets.
172         (ppc_linux_nat_target::read_description): Set isa207 field in the
173         features struct if ebb and pmu are avaiable.
174         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
175         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
176         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
177         and pmu regsets.
178         (ppc_linux_core_read_description): Check if the pmu section is
179         present and set isa207 in the features struct.
180         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
181         (ppc32_linux_pmuregset): Declare.
182         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
183         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
184         <ppc_sier_regnum>: New field.
185         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
186         New enum values.
187         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
188         values.
189         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
190         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
191         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
192         ebb and pmu features.
193
194 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
195             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
196
197         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
198         (tdesc_powerpc_isa207_vsx64l): Declare.
199         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
200         (struct ppc_linux_features) <isa207>: New field.
201         (ppc_linux_no_features): Add initializer for isa207 field.
202         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
203         new tdescs.
204         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
205         (NT_PPC_TAR): Define if not already defined.
206         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
207         rs6000/powerpc-isa207-vsx64l.
208         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
209         rs6000/powerpc-isa207-vsx64l.xml.
210         * features/rs6000/power-tar.xml: New file.
211         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
212         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
213         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
214         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
215         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
216         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
217         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
218         fetch_regset with the TAR regset.
219         (store_register, store_ppc_registers): Call store_regset with the
220         TAR regset.
221         (ppc_linux_nat_target::read_description): Set isa207 field in the
222         features struct if needed.
223         * ppc-linux-tdep.c: Include
224         features/rs6000/powerpc-isa207-vsx32l.c and
225         features/rs6000/powerpc-isa207-vsx64l.c.
226         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
227         (ppc_linux_iterate_over_regset_sections): Call back with the tar
228         regset.
229         (ppc_linux_core_read_description): Check if the tar section is
230         present and set isa207 in the features struct.
231         (_initialize_ppc_linux_tdep): Call
232         initialize_tdesc_powerpc_isa207_vsx32l and
233         initialize_tdesc_powerpc_isa207_vsx64l.
234         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
235         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
236         (enum) <PPC_TAR_REGNUM>: New enum value.
237         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
238         feature.
239         (ppc_process_record_op31): Record changes to TAR.
240
241 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
242             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
243
244         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
245         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
246         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
247         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
248         (struct ppc_linux_features) <ppr_dscr>: New field.
249         (ppc_linux_no_features): Add initializer for ppr_dscr field.
250         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
251         new tdescs.
252         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
253         Define if not already defined.
254         * features/Makefile (WHICH): Add
255         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
256         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
257         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
258         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
259         * features/rs6000/power-dscr.xml: New file.
260         * features/rs6000/power-ppr.xml: New file.
261         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
262         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
263         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
264         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
265         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
266         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
267         * ppc-linux-nat.c: Include <sys/uio.h>.
268         (fetch_regset, store_regset, check_regset): New functions.
269         (fetch_register, fetch_ppc_registers): Call fetch_regset with
270         DSCR and PPR regsets.
271         (store_register, store_ppc_registers): Call store_regset with
272         DSCR and PPR regsets.
273         (ppc_linux_get_hwcap2): New function.
274         (ppc_linux_nat_target::read_description): Call
275         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
276         features struct if needed.
277         * ppc-linux-tdep.c: Include
278         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
279         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
280         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
281         (ppc32_linux_dscrregset): New globals.
282         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
283         and dscr regsets.
284         (ppc_linux_core_read_description): Check if the ppr and dscr
285         sections are present and set ppr_dscr in the features struct.
286         (_initialize_ppc_linux_tdep): Call
287         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
288         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
289         * ppc-linux-tdep.h (ppc32_linux_pprregset)
290         (ppc32_linux_dscrregset): Declare.
291         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
292         <ppc_dscr_regnum>: New field.
293         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
294         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
295         and dscr features.
296         (ppc_process_record_op31): Record changes to PPR and DSCR.
297
298 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
299
300         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
301         second initializer line for the have_* variables.  Initialize
302         have_fpu to 0 instead of 1.
303
304 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
305
306         * arch/ppc-linux-common.c (ppc_linux_match_description):
307         Parenthesize tdesc assignements and indent them properly.
308
309 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
310
311         * ppc-linux-nat.c (fetch_register): Change if statement to else
312         if.
313         (store_register): Likewise.
314
315 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
316
317         * rs6000-tdep.c: Remove reggroups.h include.
318         (rs6000_pseudo_register_reggroup_p): Remove.
319         (rs6000_gdbarch_init): Remove call to
320         set_tdesc_pseudo_register_reggroup_p.
321
322 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
323
324         * reggroups.c (default_register_reggroup_p): Return true for
325         decfloat registers and float_reggroup.
326
327 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
328
329         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
330         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
331         ppc_linux_collect_vrregset by regcache_collect_regset.
332
333 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
334
335         * linux-tdep.c (linux_collect_regset_section_cb): Use
336         std::vector<gdb_byte> instead of char * and malloc for buf.
337         Remove xfree.
338
339 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
340
341         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
342         symtab_start instead of always using language_unknown.
343
344 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
345
346         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
347         READ_P parameter, catch and ignore register access errors from
348         either the old or new MISA location.
349         (riscv_has_feature): Update call to riscv_read_misa_reg.
350
351 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
352
353         * python/py-function.c (convert_values_to_python): Return
354         gdbpy_ref<>.  Add header comment.
355         (fnpy_call): Adjust.
356
357 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
358
359         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
360         (cmdpy_completer_handle_brkchars): Adjust.
361         (cmdpy_completer): Adjust.
362
363 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
364
365         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
366         Pass correct regnum to raw_supply_zeroed.
367
368 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
369
370         * regcache.c (cooked_read_test): Add CSKY to the list of
371         architectures with a save_reggroup
372
373 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
374
375         PR gdb/23368
376         * infrun.c (follow_exec): In the follow_exec_mode_new case,
377         transfer terminal state from old new new inferior.
378         * terminal.h (swap_terminal_info): New function.
379         * inflow.c (swap_terminal_info): New function.
380
381 2018-10-23  Tom Tromey  <tom@tromey.com>
382
383         * record-btrace.c (get_thread_current_frame_id): Rename from
384         get_thread_current_frame.  Return a frame_id.
385         (record_btrace_start_replaying): Update.
386
387 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
388
389         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
390         for CSRs.
391
392 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
393
394         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
395         have_nonsteppable_watchpoint attribute to 1.
396
397 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
398
399         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
400         register names.
401         (struct register_alias): Rename to...
402         (struct riscv_register_alias): ...this, and update comment.
403         (riscv_register_aliases): Update type, and alias names.  Remove
404         CSR names from this list.
405         (riscv_register_name): Use riscv_gdb_reg_names for int and float
406         register names.  Add an extra assertion.
407         (riscv_is_regnum_a_named_csr): New function.
408         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
409
410 2018-10-22  Jim Wilson  <jimw@sifive.com>
411
412         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
413         FP reg smaller than FP reg size, and fill with -1 instead of 0.
414
415         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
416         (riscv_register_type): Use them.
417         (riscv_print_one_register_info): Handle union of floats same as float.
418         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
419         riscv_fpreg_q_type fields.
420
421 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
422
423         * gdbarch.sh (gdbarch_num_cooked_regs): New.
424         * gdbarch.h: Re-generate.
425         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
426         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
427         * eval.c (evaluate_subexp_standard): Likewise.
428         * findvar.c (value_of_register): Likewise.
429         (value_of_register_lazy): Likewise.
430         (address_from_register): Likewise.
431         * frame.c (get_frame_register_bytes): Likewise.
432         * gdbarch-selftests.c (register_to_value_test): Likewise.
433         * h8300-tdep.c (h8300_register_type): Likewise.
434         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
435         (i386_svr4_reg_to_regnum): Likewise.
436         * infcmd.c (default_print_registers_info): Likewise.
437         (registers_info): Likewise.
438         (print_vector_info): Likewise.
439         (default_print_float_info): Likewise.
440         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
441         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
442         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
443         (mi_cmd_data_list_changed_registers): Likewise.
444         (mi_cmd_data_list_register_values): Likewise.
445         (mi_cmd_data_write_register_values): Likewise.
446         (mi_cmd_trace_frame_collected): Likewise.
447         * mips-tdep.c (print_gp_register_row): Likewise.
448         (mips_print_registers_info): Likewise.
449         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
450         * regcache.c (init_regcache_descr): Likewise.
451         (register_size): Likewise.
452         (register_dump::dump): Likewise.
453         (cooked_read_test): Likewise.
454         (cooked_write_test): Likewise.
455         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
456         (rs6000_gdbarch_init): Likewise.
457         * stabsread.c (stab_reg_to_regnum): Likewise.
458         * stack.c (info_frame_command): Likewise.
459         * target-descriptions.c (tdesc_register_name): Likewise.
460         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
461         * tui/tui-regs.c (tui_show_register_group): Likewise.
462         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
463         (user_reg_map_regnum_to_name): Likewise.
464         (value_of_user_reg): Likewise.
465         (maintenance_print_user_registers): Likewise.
466         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
467         (xtensa_register_name): Likewise.
468         (xtensa_register_type): Likewise.
469         (xtensa_reg_to_regnum): Likewise.
470         (xtensa_pseudo_register_read): Likewise.
471         (xtensa_pseudo_register_write): Likewise.
472
473 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
474
475         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
476         correctly-sized buffer with raw_read.
477         (amd64_pseudo_register_write): Use correctly-sized buffer for
478         raw_read/raw_write.
479
480 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
481
482         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
483         in add_prefix_cmd of set print type.
484
485 2018-10-19  Tom Tromey  <tom@tromey.com>
486
487         PR tui/18388:
488         * NEWS: Mention tabset deprecation.
489         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
490         (update_tab_width): New function.
491         (tui_set_tab_width, tui_show_tab_width): New functions.
492         (tui_set_tab_width_command): Use update_tab_width.
493         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
494         Add new "set tui tab-width" command.
495         * tui/tui-source.c (tui_set_source_content): Update.
496         * tui/tui-disasm.c (tui_set_disassem_content): Update.
497         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
498         Don't declare.
499         (tui_tab_width): Declare.
500         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
501         (tui_set_default_tab_len): Remove.
502
503 2018-10-19  Tom Tromey  <tom@tromey.com>
504
505         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
506         (key_is_backspace, tui_getc): Don't declare.
507         * tui/tui-io.c (key_is_start_sequence): Now static.
508         (key_is_end_sequence, key_is_backspace): Remove.
509         (tui_getc): Now static.
510
511 2018-10-19  Tom Tromey  <tom@tromey.com>
512
513         * symfile.c (reread_symbols): Clear "static_links".
514
515 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
516
517         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
518         define.
519         (aarch64_linux_sigframe_init): Extra boundary checks.
520
521 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
522
523         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
524         the possibly non-existent tdesc type 'vec128', but the type of raw
525         register v16 instead.
526
527 2018-10-19  Gary Benson <gbenson@redhat.com>
528
529         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
530
531 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
532
533         PR cli/23785
534         * cli/cli-dump.c (restore_binary_file): Check if "file" is
535         NULL.
536
537 2018-10-17  Paul Koning  <paul_koning@dell.com>
538
539         * charset.c (convert_between_encodings): Fix unsigned overflow.
540
541 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
542
543         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
544         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
545         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
546         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
547         New functions.
548         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
549         and fbsd_info_proc_mappings_header.
550         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
551         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
552         New.
553
554 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
555
556         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
557         Solaris Maintainer.
558
559 2018-10-15  Tom Tromey  <tom@tromey.com>
560
561         * tui/tui.c (strcat_to_buf): Remove casts.
562         * tui/tui-winsource.c (tui_show_source_line)
563         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
564         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
565         * tui/tui-windata.c (tui_first_data_item_displayed)
566         (tui_delete_data_content_windows, tui_erase_data_content)
567         (tui_display_all_data, tui_display_data_from)
568         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
569         * tui/tui-win.c (tui_set_win_height)
570         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
571         casts.
572         * tui/tui-win.c (tui_resize_all): Remove casts.
573         (tui_scroll_backward_command, tui_set_focus)
574         (tui_set_tab_width_command): Likewise.
575         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
576         * tui/tui-regs.c (tui_show_register_group): Remove cast.
577         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
578         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
579         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
580         Remove casts.
581
582 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
583
584         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
585         AArch64/ARM maintainer.
586
587 2018-10-11  Gary Benson <gbenson@redhat.com>
588
589         * interps.h (interp::m_name): Make private and mutable.
590         * interps.c (interp::~interp): Free m_name.
591
592 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
593             Simon Marchi <simark@simark.ca>
594
595         * README (`configure' options): Add documentation for new
596         "--enable-unit-tests" option.
597         * acinclude.m4: Include "selftest.m4".
598         * configure: Regenerate.
599         * configure.ac: Use "GDB_AC_SELFTEST".
600         * maint.c (maintenance_selftest): Update message informing
601         that selftests have been disabled.
602         (maintenance_info_selftests): Likewise.
603         * selftest.m4: New file.
604
605 2018-10-10  Gary Benson <gbenson@redhat.com>
606
607         * remote.c (remote_target::remote_send_printf): Add
608         missing va_end found by Coverity.
609
610 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
611
612         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
613
614 2018-10-09  Tom Tromey  <tom@tromey.com>
615
616         * configure: Rebuild.
617         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
618         * NEWS: Update --enable-ubsan documentation.
619
620 2018-10-09  Gary Benson <gbenson@redhat.com>
621
622         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
623         found by Coverity.
624
625 2018-10-08  Tom Tromey  <tom@tromey.com>
626
627         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
628         variable.
629         (riscv_fbsd_init_abi): Likewise.
630
631 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
632         * valops.c (value_struct_elt_for_reference): Rename local variable
633         to work around the shadowing a previous local warning.
634
635 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
636
637         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
638         * NEWS: Mention new FreeBSD/riscv native configuration.
639         * configure.host: Add riscv*-*-freebsd*.
640         * configure.nat: Likewise.
641         * riscv-fbsd-nat.c: New file.
642
643 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
644
645         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
646         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
647         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
648         * NEWS: Mention new FreeBSD/riscv target.
649         * configure.tgt: Add riscv*-*-freebsd*.
650         * riscv-fbsd-tdep.c: New file.
651         * riscv-fbsd-tdep.h: New file.
652
653 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
654
655         * regcache.h (struct regcache_map_entry): Note that this type can
656         be used with traditional frame caches.
657         * trad-frame.c (trad_frame_set_reg_regmap): New.
658         * trad-frame.h (trad_frame_set_reg_regmap): New.
659
660 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
661
662         PR c++/16841
663         * valops.c (get_virtual_base_offset): New function.
664         (value_struct_elt_for_reference): Use it to get virtual base offset
665         and add it in calculating class member address.
666
667 2018-10-08   John Darrington <john@darrington.wattle.id.au>
668
669     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
670       (check_producer): Check if the producer is codewarrior.
671       (producer_is_codewarrior): New function.
672       (lnp_state_machine::record_line): Ignore is_stmt flag for records
673        produced by codewarrior.
674       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
675
676 2018-10-06  Tom Tromey  <tom@tromey.com>
677
678         PR python/19399:
679         * python/py-inferior.c: Add "architecture" entry.
680         (infpy_architecture): New function.
681
682 2018-10-06  Tom Tromey  <tom@tromey.com>
683
684         PR python/21765:
685         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
686         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
687         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
688         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
689
690 2018-10-06  Tom Tromey  <tom@tromey.com>
691
692         PR build/17077:
693         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
694         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
695         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
696         #include.
697
698 2018-10-06  Tom Tromey  <tom@tromey.com>
699
700         * python/py-breakpoint.c (bppy_get_location): Handle a
701         bp_breakpoint without a location.
702
703 2018-10-06  Tom Tromey  <tom@tromey.com>
704
705         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
706         (_RegEx): Reformat help text.
707         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
708         (AnyCallerIs, AnyCallerMatches): Reformat help text.
709         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
710         text.
711         * python/lib/gdb/command/xmethods.py (InfoXMethod)
712         (EnableXMethod, DisableXMethod): Remove help indentation.
713         Capitalize meta-syntactic variables.
714         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
715         (EnableUnwinder, DisableUnwinder): Remove help indentation.
716         Capitalize meta-syntactic variables.
717         * python/lib/gdb/command/explore.py (ExploreCommand)
718         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
719         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
720         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
721         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
722         Remove help indentation.
723         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
724         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
725         (DisableFrameFilter, SetFrameFilterPriority)
726         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
727
728 2018-10-06  Tom Tromey  <tom@tromey.com>
729
730         PR tui/28819:
731         * tui/tui-io.c (gdb_wgetch): New function.
732         (tui_mld_getc, tui_getc): Use it.
733
734 2018-10-05  Tom Tromey  <tom@tromey.com>
735
736         * sol-thread.c (sol_thread_target::wait): Rename inner
737         "save_ptid".
738
739 2018-10-04  Tom Tromey  <tom@tromey.com>
740
741         * configure: Rebuild.
742         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
743
744 2018-10-04  Tom Tromey  <tom@tromey.com>
745
746         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
747         declaration of "block".
748
749 2018-10-04  Tom Tromey  <tom@tromey.com>
750
751         * common/filestuff.c (fdwalk): Remove inner declaration of
752         "result".
753
754 2018-10-04  Tom Tromey  <tom@tromey.com>
755
756         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
757         "structs_addr" and hoist declaration.
758
759 2018-10-04  Tom Tromey  <tom@tromey.com>
760
761         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
762         variable "size".
763
764 2018-10-04  Tom Tromey  <tom@tromey.com>
765
766         * mdebugread.c (parse_partial_symbols): Use std::string.
767
768 2018-10-04  Tom Tromey  <tom@tromey.com>
769
770         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
771         * p-valprint.c (pascal_val_print): Split inner "i" variable.
772         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
773         header.
774         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
775         more inner scope.
776         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
777         * varobj.c (varobj_update): Rename inner "newobj",
778         "type_changed".
779         * valprint.c (generic_emit_char): Rename inner "buf".
780         * valops.c (find_overload_match): Rename inner "temp".
781         (value_struct_elt_for_reference): Declare "v" in more inner
782         scope.
783         * v850-tdep.c (v850_push_dummy_call): Rename "len".
784         * unittests/array-view-selftests.c (run_tests): Rename inner
785         "vec".
786         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
787         header.
788         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
789         "tsv" in more inner scope.
790         (print_one_static_tracepoint_marker): Rename inner
791         "tuple_emitter".
792         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
793         (tic6x_push_dummy_call): Don't redeclare "addr".
794         * target-float.c: Declare "dto" lower.
795         * symtab.c (lookup_local_symbol): Rename inner "sym".
796         (find_pc_sect_line): Rename inner "pc".
797         * stack.c (print_frame): Don't redeclare "gdbarch".
798         (return_command): Rename inner "gdbarch".
799         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
800         "sp".
801         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
802         header.
803         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
804         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
805         scope.
806         * remote.c (remote_target::update_thread_list): Don't redeclare
807         "tp".
808         (remote_target::process_initial_stop_replies): Rename inner
809         "thread".
810         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
811         (remote_target::wait_as): Don't redeclare "stop_reply".
812         (remote_target::get_thread_local_address): Rename inner
813         "result".
814         (remote_target::get_tib_address): Likewise.
815
816         * regcache.c (cooked_read_test): Rename "regnum".
817         * record-btrace.c (cmd_record_btrace_start): Rename inner
818         "exception".
819         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
820         loop header.
821         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
822         header.
823         (ppu2spu_sniffer): Rename inner "buf".
824         * parse.c (operator_check_standard): Rename inner "type",
825         "objfile".
826         * p-valprint.c (pascal_val_print): Introduce new scope for
827         "low_bound", "high_bound".
828         * p-exp.y (yylex): Declare "i" in loop header.
829         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
830         Lower declaration of "s".
831         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
832         header.
833         (nios2_push_dummy_call): Rename "len".
834         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
835         "buf".
836         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
837         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
838         (linux_xfer_osdata_modules): Likewise.
839         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
840         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
841         (mips_o64_push_dummy_call): Likewise.
842         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
843         "op".
844         * mi/mi-main.c (list_available_thread_groups): Rename inner
845         "tuple_emitter".
846         (mi_cmd_data_read_memory): Rename inner "opts".
847         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
848         "tuple_emitter".
849         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
850         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
851         more inner scope.
852         (parse_partial_symbols): Rename inner "pst", "p", "name"
853         * main.c (captured_main_1): Rename inner "i"s.
854         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
855         "oso2".
856         * linux-tdep.c (linux_info_proc): Rename inner "filename".
857         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
858         * infrun.c (handle_no_resumed): Don't redeclare "thread".
859         (handle_signal_stop): Rename inner "gdbarch".
860         (handle_command): Declare "signum" in loop header.
861         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
862         "status".
863         (examine_prologue): Rename inner "sol" and "sof".
864         (ia64_extract_return_value): Rename inner "val".  Declare another
865         "val" in a more inner scope.
866         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
867         inner scope.
868         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
869         "except".
870         * findvar.c (default_read_var_value): Don't redeclare "addr".
871         * f-exp.y (yylex): Declare "i" in loop header.
872         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
873         Rename inner "type", "expect_type".
874         (evaluate_subexp_for_sizeof): Rename inner "pc".
875         * elfread.c (elf_symfile_read): Rename inner "abfd".
876         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
877         "bytes_read".
878         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
879         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
880         (dwarf_decode_line_header): Rename inner "lh".
881         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
882         "offset".  Declare "i" in loop header.
883         (disassemble_dwarf_expression): Rename inner "addr_size".
884         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
885         inner "result".
886         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
887         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
888         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
889         "inner_list_emitter".
890         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
891         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
892         declaration in a block.
893         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
894         * cp-valprint.c (cp_print_value_fields): Don't redeclare
895         "obstack_final_size".
896         * cp-support.c (inspect_type): Declare "i" in loop header.
897         * compile/compile.c (compile_instance::insert_symbol_error):
898         Rename inner "e".
899         * common/agent.c (agent_run_command): Remove inner "ret"
900         declaration.
901         * coffread.c (coff_symfile_read): Rename inner "name".
902         (coff_symfile_read): Rename inner "abfd".
903         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
904         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
905         "high".
906         * c-exp.y (lex_one_token): Move "len" declaration lower.
907         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
908         "gdbarch".
909         (create_exception_master_breakpoint): Likewise.  Don't redeclare
910         "b".
911         (watch_command_1): Declare "mark" later.
912         (clear_command): Don't shadow "a" or "b".
913         (delete_command): Rename inner "b".
914         (delete_trace_command): Likewise.
915         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
916         "op".
917         (arm_gdbarch_init): Remove inner "e_flags".
918         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
919         "offset" in inner blocks.
920
921 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
922
923         * dwarf-index-write.c (file_write): Don't write if the vector is
924         empty.
925
926 2018-10-05  Tom de Vries  <tdevries@suse.de>
927
928         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
929         PyArg_ParseTuple call.
930
931 2018-10-05  Tom de Vries  <tdevries@suse.de>
932
933         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
934         PyArg_ParseTuple call.
935
936 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
937
938         * psymtab.c (recursively_search_psymtabs): Reformat parameters
939         to avoid exceeding 80 characters per line limit.
940
941 2018-10-04  Tom Tromey  <tom@tromey.com>
942
943         * symfile.c (syms_from_objfile_1, finish_new_objfile)
944         (reread_symbols): Update.
945         * complaints.h (clear_complaints): Remove argument.
946         * complaints.c (enum complaint_series): Remove.
947         (series): Remove global.
948         (complaint_internal): Update.
949         (clear_complaints): Remove argument.
950
951 2018-10-04  Tom Tromey  <tom@tromey.com>
952
953         * symfile.c (symbol_file_add_with_addrs): Do not print "no
954         debugging symbols" message if there is a separate debug objfile.
955
956 2018-10-04  Tom Tromey  <tom@tromey.com>
957
958         PR cli/19551:
959         * symfile.c (symbol_file_add_with_addrs): Update output.
960         * psymtab.c (require_partial_symbols): Update output.
961
962 2018-10-04  Tom Tromey  <tom@tromey.com>
963
964         PR cli/22234:
965         * complaints.c: Emit \n.
966
967 2018-10-04  Tom Tromey  <tom@tromey.com>
968
969         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
970         (separate_debug_file_exists, find_separate_debug_file)
971         (add_symbol_file_command, reread_symbols, allocate_symtab)
972         (allocate_compunit_symtab): Use filtered printing, not
973         unfiltered.
974         * psymtab.c (require_partial_symbols, dump_psymtab)
975         (allocate_psymtab): Use filtered printing, not unfiltered.
976
977 2018-10-04  Tom Tromey  <tom@tromey.com>
978
979         * complaints.c (complaint_internal): Correctly check complaint
980         count.
981
982 2018-10-04  Tom Tromey  <tom@tromey.com>
983
984         * complaints.h (struct complaints): Remove declaration.
985         * complaints.c (clear_complaints): Remove an unused variable.
986
987 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
988
989         * MAINTAINERS (Write After Approval): Add self.
990
991 2018-10-03  Tom Tromey  <tom@tromey.com>
992
993         * guile/scm-value.c (gdbscm_value_to_string): Initialize
994         "buffer_contents".
995         * coffread.c (coff_symtab_read): Initialize "newobj".
996
997 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
998
999         * dwarf2read.c (read_func_scope): Remove struct keyword in
1000         range-based for.
1001
1002 2018-10-03  Tom Tromey  <tom@tromey.com>
1003
1004         * README: Mention --enable-ubsan.
1005         * NEWS: Mention --enable-ubsan.
1006         * acinclude.m4: Include sanitize.m4.
1007         * configure: Rebuild.
1008         * configure.ac: Call AM_GDB_UBSAN.
1009         * sanitize.m4: New file.
1010
1011 2018-10-03  Tom Tromey  <tom@tromey.com>
1012
1013         * expression.h (enum exp_opcode): Use uint8_t as base type.
1014         * expprint.c (op_name): Handle invalid opcodes.
1015
1016 2018-10-03  Tom Tromey  <tom@tromey.com>
1017
1018         * parse.c (prefixify_expression): Add assert.
1019         (parse_exp_in_context_1): Throw exception if the expression is
1020         empty.
1021
1022 2018-10-03  Tom Tromey  <tom@tromey.com>
1023
1024         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1025
1026 2018-10-03  Tom Tromey  <tom@tromey.com>
1027
1028         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1029
1030 2018-10-03  Tom Tromey  <tom@tromey.com>
1031
1032         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1033         unsigned.
1034
1035 2018-10-03  Tom Tromey  <tom@tromey.com>
1036
1037         * findvar.c (extract_integer): Do work in an unsigned type.
1038
1039 2018-10-03  Tom Tromey  <tom@tromey.com>
1040
1041         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1042         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1043         base type.
1044         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1045         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1046         type.
1047         * c-lang.h (enum c_string_type_values): Use unsigned as base
1048         type.
1049         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1050
1051 2018-10-03  Tom Tromey  <tom@tromey.com>
1052
1053         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1054         <~dwarf2_frame_state_reg_info>: Update.
1055         <dwarf2_frame_state_reg_info>: Update.
1056         <alloc_regs>: Add assertion.  Update.
1057         <reg>: Now a std::vector.
1058         <num_regs>: Remove.
1059         <swap>: Update.
1060         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1061         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1062
1063 2018-10-03  Tom Tromey  <tom@tromey.com>
1064
1065         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1066
1067 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1068
1069         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1070
1071 2018-10-02  Tom Tromey  <tom@tromey.com>
1072
1073         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1074
1075 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1076
1077         * NEWS: Mention changed commands.
1078         * ser-uds.c: New file.
1079         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1080         * configure: Regenerate.
1081         * Makefile.in: Add new file.
1082         * serial.c (serial_open): Check if filename is a socket
1083           and lookup the appropriate interface accordingly.
1084
1085 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1086
1087         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1088         define.
1089         (AARCH64_EXTRA_MAGIC): Likewise.
1090         (AARCH64_FPSIMD_MAGIC): Likewise.
1091         (AARCH64_SVE_MAGIC): Likewise.
1092         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1093         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1094         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1095         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1096         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1097         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1098         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1099         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1100         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1101         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1102         (read_aarch64_ctx): Add function.
1103         (aarch64_linux_sigframe_init): Detect FP registers.
1104
1105 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1106
1107         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1108         (AARCH64_D0_REGNUM): Likewise.
1109         (AARCH64_S0_REGNUM): Likewise.
1110         (AARCH64_H0_REGNUM): Likewise.
1111         (AARCH64_B0_REGNUM): Likewise.
1112         (AARCH64_SVE_V0_REGNUM): Likewise.
1113         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1114         (AARCH64_D0_REGNUM): Likewise.
1115         (AARCH64_S0_REGNUM): Likewise.
1116         (AARCH64_H0_REGNUM): Likewise.
1117         (AARCH64_B0_REGNUM): Likewise.
1118         (AARCH64_SVE_V0_REGNUM): Likewise.
1119
1120 2018-10-01  Gary Benson <gbenson@redhat.com>
1121
1122         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1123         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1124         prfpregset_t instead of gdb_prfpregset_t.
1125         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1126         * configure, config.in: Rebuild.
1127
1128 2018-10-01  Gary Benson <gbenson@redhat.com>
1129
1130         * common/gdb_proc_service.h: New file, factored out from...
1131         * gdb_proc_service.h: Moved common code to the above file.
1132         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1133
1134 2018-10-01  Gary Benson <gbenson@redhat.com>
1135
1136         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1137         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1138
1139 2018-10-01  Gary Benson <gbenson@redhat.com>
1140
1141         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1142         (AC_CHECK_HEADERS): Check for linux/elf.h.
1143         * configure, config.in: Rebuild.
1144         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1145         doesn't define elf_fpregset_t.
1146
1147 2018-10-01  Gary Benson <gbenson@redhat.com>
1148
1149         * gdb_proc_service.h: Whitespace change.
1150
1151 2018-10-01  Tom Tromey  <tom@tromey.com>
1152
1153         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1154         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1155         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1156
1157 2018-10-01  Tom Tromey  <tom@tromey.com>
1158
1159         * README: Minor change.
1160
1161 2018-09-30  Pedro Alves  <palves@redhat.com>
1162
1163         * darwin-nat-info.c (darwin_debug_regions_recurse)
1164         (info_mach_exceptions_command): Remove unused local variables.
1165         * darwin-nat.c (darwin_decode_notify_message)
1166         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1167         (darwin_stop_inferior, darwin_setup_exceptions)
1168         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1169         (darwin_nat_target::attach, darwin_nat_target::detach)
1170         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1171         local variables.
1172         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1173         variables.
1174
1175 2018-09-29  Tom Tromey  <tom@tromey.com>
1176
1177         * README: Remove some leftover text.
1178
1179 2018-09-29  Tom Tromey  <tom@tromey.com>
1180
1181         * PROBLEMS: Rewrite.
1182         * README: Update.
1183
1184 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1185
1186         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1187         case with explicit breakpoint kind.
1188         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1189         'additional_info' and related logic.
1190         (riscv_debug_breakpoints): New variable.
1191         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1192         instruction to determine the breakpoint kind.
1193         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1194         flag.  Update description of 'set/show riscv
1195         use-compressed-breakpoints' flag.
1196
1197 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1198
1199         (NEWS): Mention changes to frame related commands.
1200         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1201         (add_prefix_cmd_suppress_notification): New function.
1202         (add_com_suppress_notification): Call
1203         add_cmd_suppress_notification.
1204         * command.h (add_cmd_suppress_notification): Declare.
1205         (add_prefix_cmd_suppress_notification): Declare.
1206         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1207         (parse_frame_specification): Moved from stack.c, with
1208         simplification to handle a single argument.
1209         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1210         switch to the selected frame.  Add a header comment.
1211         * stack.c: Remove 'safe-ctype.h' include.
1212         (find_frame_for_function): Add declaration.
1213         (find_frame_for_address): New function.
1214         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1215         (frame_selection_by_function_completer): New function.
1216         (info_frame_command): Rename to...
1217         (info_frame_command_core): ...this, and update parameter types.
1218         (select_frame_command): Rename to...
1219         (select_frame_command_core): ...this, and update parameter types.
1220         (frame_command): Rename to...
1221         (frame_command_core): ...this, and update parameter types.
1222         (class frame_command_helper): New class to wrap implementations of
1223         frame related sub-commands.
1224         (frame_apply_cmd_list): New static global.
1225         (frame_cmd_list): Make static.
1226         (select_frame_cmd_list): New global for sub-commands.
1227         (info_frame_cmd_list): New global for sub-commands.
1228         (_initialize_stack): Register sub-commands for 'frame',
1229         'select-frame', and 'info frame'.  Update 'frame apply' commands
1230         to use frame_apply_cmd_list.  Move function local static
1231         frame_apply_list to file static frame_apply_cmd_list for
1232         consistency.
1233         * stack.h (select_frame_command): Delete declarationn.
1234         (select_frame_for_mi): Declare new function.
1235
1236 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1237
1238         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1239         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1240         and NOP.
1241
1242 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1243
1244         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1245
1246 2018-09-26  Tom Tromey  <tom@tromey.com>
1247
1248         * valops.c (auto_abandon): Remove dead code.
1249
1250 2018-09-26  Tom Tromey  <tom@tromey.com>
1251
1252         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1253
1254 2018-09-24  Tom Tromey  <tom@tromey.com>
1255
1256         * common/pathstuff.c (get_standard_cache_dir): Make
1257         "xdg_cache_home" and "home" const.
1258         * top.c (init_history): Make "tmpenv" const.
1259         * main.c (get_init_files): Make "homedir" const.
1260
1261 2018-09-23  Tom Tromey  <tom@tromey.com>
1262
1263         PR python/18852:
1264         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1265
1266 2018-09-23  Tom Tromey  <tom@tromey.com>
1267
1268         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1269         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1270         * python/python-internal.h (gdbpy_handle_exception): Declare.
1271         * python/py-utils.c (gdbpy_handle_exception): New function.
1272
1273 2018-09-23  Tom Tromey  <tom@tromey.com>
1274
1275         PR python/17284:
1276         * python/py-type.c (typy_template_argument): Check for negative
1277         argument number.
1278
1279 2018-09-23  Tom Tromey  <tom@tromey.com>
1280
1281         PR python/14062:
1282         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1283
1284 2018-09-23  Tom Tromey  <tom@tromey.com>
1285
1286         PR python/18170:
1287         * python/py-value.c (valpy_int): Allow conversion from pointer
1288         type.
1289
1290 2018-09-23  Tom Tromey  <tom@tromey.com>
1291
1292         PR python/20126:
1293         * python/py-value.c (valpy_int): Respect type sign.
1294
1295 2018-09-23  Tom Tromey  <tom@tromey.com>
1296
1297         PR python/18352;
1298         * python/py-value.c (valpy_float): Allow conversions from int or
1299         char.
1300         (valpy_int, valpy_long): Allow conversions from float.
1301
1302 2018-09-23  Tom Tromey  <tom@tromey.com>
1303
1304         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1305         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1306
1307 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1308
1309         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1310         __sighndlr.
1311         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1312
1313 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1314
1315         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1316         target_terminal::ours().
1317
1318 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1319
1320         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1321         of vl to ULONGEST.
1322
1323 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1324
1325         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1326         redundant condition.
1327
1328 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1329
1330         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1331
1332         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1333         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1334         * sol-thread.c (ps_pdmodel): Don't guard definition.
1335
1336         * procfs.c: Fix formatting.
1337
1338         * procfs.c (sysset_t_alloc): Remove.
1339         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1340         (procfs_debug_inferior): Likewise.
1341         (procfs_set_exec_trap): Likewise.
1342         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1343         (proc_set_traced_sysexit): Likewise.
1344
1345         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1346         (dead_procinfo): Likewise.
1347         (proc_warn): Likewise.
1348         (proc_error): Likewise.
1349         (proc_get_LDT_entry): Likewise.
1350         (do_attach): Likewise.
1351         (procfs_target::pid_to_str): Likewise.
1352         (iterate_over_mappings): Likewise.
1353
1354         * procfs.c (create_procinfo): Fix ARI warning.
1355         (proc_get_status): Likewise.
1356         (proc_stop_process): Likewise.
1357         (proc_run_process): Likewise.
1358         (proc_kill): Likewise.
1359         (proc_get_LDT_entry): Likewise.
1360         (procfs_find_LDT_entry): Likewise.
1361         (proc_update_threads): Likewise.
1362         (proc_iterate_over_threads): Likewise.
1363         (do_attach): Likewise.
1364         (procfs_xfer_memory): Likewise.
1365         (invalidate_cache): Likewise.
1366         (procfs_target::resume): Likewise.
1367         (procfs_init_inferior): Likewise.
1368         (procfs_set_exec_trap): Likewise.
1369         (procfs_target::thread_alive): Likewise.
1370         (procfs_target::pid_to_exec_file): Likewise.
1371         (iterate_over_mappings): Likewise.
1372         (procfs_target::make_corefile_notes): Likewise.
1373         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1374
1375         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1376         (procfs_find_LDT_entry): Likewise.
1377         * sol-thread.c (ps_lgetLDT): Likewise.
1378
1379 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1380
1381         PR tdep/17903
1382         * procfs.c (procfs_target): Declare pid_to_exec_file.
1383         (procfs_target::pid_to_exec_file): New.
1384
1385 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1386
1387         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1388         renaming.
1389         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1390         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1391
1392 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1393
1394         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1395         (supply_fpregset, fill_fpregset): Move ...
1396         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1397         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1398         Remove references to ioctl-based procfs.
1399         Include <sys/reg.h>.
1400         Remove PR_MODEL_NATIVE guards.
1401         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1402         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1403
1404 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1405
1406         PR gdb/20981:
1407         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1408         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1409         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1410
1411 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1412
1413         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1414         (fbsd_print_sockaddr_in6): Likewise.
1415
1416 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1417             Chris January  <chris.january@arm.com>
1418
1419         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1420         (evaluate_subexp_standard): Return a dummy type when
1421         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1422         OP_F77_UNDETERMINED_ARGLIST case.
1423         * expression.h (enum noside): Update comment.
1424
1425 2018-09-19  George Vasick <george.vasick@oracle.com>
1426
1427         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1428
1429 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1430             April Chin <april.chin@oracle.com>
1431             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1432
1433         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1434         uint_t lwpid_t.
1435         (create_procinfo): Print pids in /proc without leading zeros.
1436
1437 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1438
1439         * nios2-tdep.c (nios2_gcc_target_options): New.
1440         (nios2_gdb_arch_init): Install new hook.
1441
1442 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1443
1444         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1445         New file.
1446         * update-gnulib.sh: Apply patch.
1447         * configure: Re-generate.
1448
1449 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1450
1451         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1452         description.  Make "info proc" command descriptions more
1453         consistent.
1454
1455 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1456
1457         * NEWS: Mention 'info proc files' command.
1458
1459 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1460
1461         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1462         descriptors for IP_FILES and IP_ALL.
1463
1464 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1465
1466         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1467         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1468         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1469         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1470         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1471         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1472         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1473         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1474         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1475         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1476         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1477         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1478         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1479         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1480         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1481         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1482         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1483         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1484         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1485         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1486         (struct fbsd_sockaddr_un): New types.
1487         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1488         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1489         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1490         (fbsd_core_info_proc_files): New functions.
1491         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1492         IP_ALL.
1493         * fbsd-tdep.h (fbsd_info_proc_files_header)
1494         (fbsd_info_proc_files_entry): New.
1495
1496 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1497
1498         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1499         * infcmd.c (info_proc_cmd_files): New function.
1500         (_initialize_infcmd): Register 'info proc files' command.
1501
1502 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1503
1504         * gnulib/aclocal-m4-deps.mk: Re-generate.
1505         * gnulib/aclocal.m4: Re-generate.
1506         * gnulib/config.in: Re-generate.
1507         * gnulib/configure: Re-generate.
1508         * gnulib/import/Makefile.am: Re-generate.
1509         * gnulib/import/Makefile.in: Re-generate.
1510         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1511         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1512         * gnulib/import/arpa_inet.in.h: New file.
1513         * gnulib/import/inet_ntop.c: New file.
1514         * gnulib/import/m4/arpa_inet_h.m4: New file.
1515         * gnulib/import/m4/inet_ntop.m4: New file.
1516         * gnulib/import/m4/netinet_in_h.m4: New file.
1517         * gnulib/import/m4/socklen.m4: New file.
1518         * gnulib/import/m4/sockpfaf.m4: New file.
1519         * gnulib/import/m4/stdalign.m4: New file.
1520         * gnulib/import/m4/sys_uio_h.m4: New file.
1521         * gnulib/import/netinet_in.in.h: New file.
1522         * gnulib/import/stdalign.in.h: New file.
1523         * gnulib/import/sys_socket.c: New file.
1524         * gnulib/import/sys_socket.in.h: New file.
1525         * gnulib/import/sys_uio.in.h: New file.
1526         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1527         module.
1528
1529 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1530
1531         * gnulib/aclocal-m4-deps.mk: New file.
1532         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1533         deterministically.
1534
1535 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1536
1537         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1538         KVE_PATH.
1539
1540 2018-09-18  Tom Tromey  <tom@tromey.com>
1541
1542         * compile/compile-object-load.c (struct
1543         link_hash_table_cleanup_data): Add constructor and destructor.
1544         Use DISABLE_COPY_AND_ASSIGN.
1545         (~link_hash_table_cleanup_data): Rename from
1546         link_hash_table_free.  Now a destructor.
1547         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1548
1549 2018-09-18  Tom Tromey  <tom@tromey.com>
1550
1551         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1552         * compile/compile-object-load.c (struct munmap_list): Move to
1553         header file.
1554         (munmap_list::add): Rename from munmap_list_add; rewrite.
1555         (munmap_list::~munmap_list): Rename from munmap_list_free.
1556         (munmap_listp_free_cleanup): Remove.
1557         (compile_object_load): Update.
1558         * compile/compile-object-load.h (struct munmap_list): Move from
1559         compile-object-load.c.  Rewrite.
1560
1561 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1562
1563         * aarch64-tdep.c (pass_in_v): Use register size.
1564         (aarch64_extract_return_value): Likewise.
1565         (aarch64_store_return_value): Likewise.
1566
1567 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1568
1569         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1570         rlim_t.
1571
1572 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1573
1574         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1575         Fix short help line.
1576
1577 2018-09-17  Tom Tromey  <tom@tromey.com>
1578
1579         PR python/20445:
1580         * configure: Rebuild.
1581         * configure.ac: Conditionally use -DNDEBUG for Python.
1582
1583 2018-09-17  Tom Tromey  <tom@tromey.com>
1584
1585         * configure: Rebuild.
1586         * configure.ac: Use gmp as a library dependency when checking for
1587         mpfr.
1588
1589 2018-09-17  Pedro Alves  <palves@redhat.com>
1590
1591         * python/py-inferior.c (find_inferior_object): Delete.
1592
1593 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1594
1595         * compile/compile-cplus-types.c
1596         (compile_cplus_instance::enter_scope): Don't use new_scope after
1597         std::move.
1598
1599 2018-09-17  Tom Tromey  <tom@tromey.com>
1600
1601         * common/pathstuff.c (get_standard_cache_dir): Use
1602         ~/Library/Caches on macOS.
1603         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1604
1605 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1606
1607         PR python/23669
1608         * breakpoint.c (commands_cmd_element): New.
1609         (_initialize_breakpoint): Assign commands_cmd_element.
1610         * breakpoint.h (commands_cmd_element): New.
1611         * cli/cli-script.c (while_cmd_element, if_command,
1612         define_cmd_element): New.
1613         (command_name_equals): Remove.
1614         (process_next_line): Compare commands by pointer, not by name.
1615         (_initialize_cli_script): Assign the various cmd_list_element
1616         variables.
1617         * compile/compile.c (compile_cmd_element): New.
1618         (_initialize_compile): Assign compile_cmd_element.
1619         * compile/compile.h (compile_cmd_element): New.
1620         * guile/guile.c (guile_cmd_element): New.
1621         (install_gdb_commands): Assign guile_cmd_element.
1622         * guile/guile.h (guile_cmd_element): New.
1623         * python/python.c (python_cmd_element): New.
1624         (_initialize_python): Assign python_cmd_element.
1625         * python/python.h (python_cmd_element): New.
1626         * tracepoint.c (while_stepping_cmd_element): New.
1627         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1628         * tracepoint.h (while_stepping_cmd_element): New.
1629
1630 2018-09-17  Tom Tromey  <tom@tromey.com>
1631
1632         * infrun.c (save_infcall_suspend_state): Return
1633         infcall_suspend_state_up.
1634         (save_infcall_control_state): Return infcall_control_state_up.
1635         * inferior.h (save_infcall_suspend_state)
1636         (save_infcall_control_state): Declare later.  Return unique
1637         pointers.
1638
1639 2018-09-17  Tom Tromey  <tom@tromey.com>
1640
1641         * infrun.c (struct stop_context): Declare constructor,
1642         destructor, "changed" method.
1643         (stop_context::stop_context): Rename from save_stop_context.
1644         (stop_context::~stop_context): Rename from
1645         release_stop_context_cleanup.
1646         (normal_stop): Update.
1647         (stop_context::changed): Rename from stop_context_changed.  Return
1648         bool.
1649
1650 2018-09-17  Tom Tromey  <tom@tromey.com>
1651
1652         * inferior.h (struct infcall_suspend_state_deleter): New.
1653         (infcall_suspend_state_up): New typedef.
1654         (struct infcall_control_state_deleter): New.
1655         (infcall_control_state_up): New typedef.
1656         (make_cleanup_restore_infcall_suspend_state)
1657         (make_cleanup_restore_infcall_control_state): Don't declare.
1658         * infcall.c (call_function_by_hand_dummy): Update.
1659         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1660         (make_cleanup_restore_infcall_suspend_state): Remove.
1661         (do_restore_infcall_control_state_cleanup)
1662         (make_cleanup_restore_infcall_control_state): Remove.
1663
1664 2018-09-17  Tom Tromey  <tom@tromey.com>
1665
1666         * gdbthread.h (struct thread_control_state): Add initializer.
1667         (class thread_info) <control>: Remove initializer.
1668         * inferior.h (struct inferior_control_state): Add initializer.
1669         (class inferior) <control>: Remove initializer.
1670         (exit_inferior_1): Update.
1671         * infrun.c (struct infcall_control_state): Add constructors.
1672         (save_infcall_control_state): Use new.
1673         (restore_infcall_control_state, discard_infcall_control_state):
1674         Use delete.
1675
1676 2018-09-17  Tom Tromey  <tom@tromey.com>
1677
1678         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1679         unique_ptr.
1680         <siginfo_data>: Now a unique_xmalloc_ptr.
1681         (save_infcall_suspend_state, restore_infcall_suspend_state)
1682         (discard_infcall_suspend_state)
1683         (get_infcall_suspend_state_regcache): Update.
1684
1685 2018-09-17  Tom Tromey  <tom@tromey.com>
1686
1687         * gdbthread.h (struct thread_suspend_state): Add initializers.
1688         (class thread_info) <suspend>: Remove initializer.
1689         * infrun.c (struct infcall_suspend_state): Add initializers.
1690         (save_infcall_suspend_state): Use new.
1691         (discard_infcall_suspend_state): Use delete.
1692
1693 2018-09-16  Tom Tromey  <tom@tromey.com>
1694
1695         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1696         Remove.
1697         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1698         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1699         (py_varobj_iter_new): Likewise.
1700         (py_varobj_get_iterator): Use gdbpy_ref.
1701
1702 2018-09-16  Tom Tromey  <tom@tromey.com>
1703
1704         * python/py-threadevent.c (py_get_event_thread): Simplify.
1705         * python/py-inferior.c (infpy_thread_from_thread_handle):
1706         Return immediately after calling thread_to_thread_object.  Use
1707         Py_RETURN_NONE.
1708         (thread_to_thread_object): Set the exception on a NULL return.
1709
1710 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1711
1712         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1713
1714 2018-09-16  Tom Tromey  <tom@tromey.com>
1715
1716         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1717         Remove.
1718
1719 2018-09-16  Tom Tromey  <tom@tromey.com>
1720
1721         * python/python-internal.h (thread_to_thread_object): Change
1722         return type.
1723         * python/py-inferior.c (thread_to_thread_object): Return a new
1724         reference.
1725         (infpy_thread_from_thread_handle): Update.
1726         * python/py-infthread.c (gdbpy_selected_thread): Update.
1727         * python/py-stopevent.c (create_stop_event_object): Update.
1728         * python/py-threadevent.c (py_get_event_thread): Return a new
1729         reference.
1730         (py_get_event_thread): Update.
1731         * python/py-event.h (py_get_event_thread): Change return type.
1732         * python/py-continueevent.c (create_continue_event_object):
1733         Update.
1734
1735 2018-09-16  Tom Tromey  <tom@tromey.com>
1736
1737         * python/py-progspace.c (pspy_get_objfiles): Update.
1738         * python/python-internal.h (objfile_to_objfile_object): Change
1739         return type.
1740         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1741         Update.
1742         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1743         Update.
1744         * python/python.c (gdbpy_get_current_objfile): Update.
1745         (gdbpy_objfiles): Update.
1746         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1747         Update.
1748         (objfile_to_objfile_object): Return a new reference.
1749         * python/py-symtab.c (stpy_get_objfile): Update.
1750         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1751         Update.
1752
1753 2018-09-16  Tom Tromey  <tom@tromey.com>
1754
1755         * python/py-inferior.c (infpy_get_progspace): Update.
1756         * python/python-internal.h (pspace_to_pspace_object): Change
1757         return type.
1758         * python/py-newobjfileevent.c
1759         (create_clear_objfiles_event_object): Update.
1760         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1761         Update.
1762         * python/python.c (gdbpy_get_current_progspace): Update.
1763         (gdbpy_progspaces): Update.
1764         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1765         reference.
1766         * python/py-objfile.c (objfpy_get_progspace): Update.
1767         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1768         Update.
1769
1770 2018-09-16  Tom Tromey  <tom@tromey.com>
1771
1772         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1773         (solib_name, block_for_pc, find_pc_line): New functions.
1774         (execute_unwinders): Update.
1775         * python/py-block.c (gdbpy_block_for_pc): Remove.
1776         * python/py-inferior.c (infpy_get_progspace): New function.
1777         (inferior_object_getset) <progspace>: Add.
1778         * python/py-progspace.c (pspy_objfiles): Rewrite.
1779         (pspy_solib_name, pspy_block_for_pc)
1780         (pspy_find_pc_line, pspy_is_valid): New functions.
1781         (progspace_object_methods): Add entries for solib_name,
1782         block_for_pc, find_pc_line, is_valid.
1783         * python/python-internal.h (gdbpy_block_for_pc)
1784         (build_objfiles_list): Don't declare.
1785         * python/python.c: Don't include solib.h.
1786         (gdbpy_solib_name, gdbpy_find_pc_line)
1787         (gdbpy_get_current_progspace, build_objfiles_list)
1788         (gdbpy_objfiles): Remove.
1789         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1790         solib_name, find_pc_line>: Remove entries.
1791
1792 2018-09-16  Tom Tromey  <tom@tromey.com>
1793
1794         * top.c (new_ui_command): Use GNU style for metasyntactic
1795         variables.
1796         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1797         variables.
1798         * maint.c (maintenance_translate_address): Remove "<>" around
1799         text.
1800         * interps.c (interpreter_exec_cmd): Use GNU style for
1801         metasyntactic variables.
1802         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1803         metasyntactic variables.
1804         * tracepoint.c (tfind_range_command): Use GNU style for
1805         metasyntactic variables.
1806         (tfind_outside_command): Likewise.
1807         (_initialize_tracepoint): Likewise.
1808         * remote.c (extended_remote_target::create_inferior): Use GNU
1809         style for metasyntactic variables.
1810         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1811         metasyntactic variables.
1812         (adi_assign_command): Likewise.
1813
1814 2018-09-16  Tom Tromey  <tom@tromey.com>
1815
1816         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1817         metasyntactic variables.  Print message if no disassembler options
1818         are available.
1819
1820 2018-09-15  Tom Tromey  <tom@tromey.com>
1821
1822         * infcmd.c (get_inferior_args): Return const char *.
1823         * inferior.h (get_inferior_args): Return type now const.
1824         * linux-tdep.c (linux_fill_prpsinfo): Update.
1825         * procfs.c (procfs_target::make_corefile_notes): Update.
1826
1827 2018-09-07  Tom Tromey  <tom@tromey.com>
1828
1829         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1830         inside the TRY.
1831
1832 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1833
1834         * nios2-tdep.c (nios2_type_align): New.
1835         (nios2_gdb_arch_init): Install type_align hook.
1836
1837 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1838
1839         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1840         type that is neither object file owned, nor gdbarch owned.
1841         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1842         gdbarch is non-NULL.
1843         (alloc_type_instance): Allocate non-objfile owned types on the
1844         gdbarch obstack.
1845         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1846         using TYPE_ALLOC to ensure memory is allocated on the correct
1847         obstack.
1848         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1849         obstack, or the gdbarch obstack.
1850         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1851
1852 2018-09-14  Tom Tromey  <tom@tromey.com>
1853
1854         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1855         block.
1856
1857 2018-09-14  Tom Tromey  <tom@tromey.com>
1858
1859         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1860
1861 2018-09-13  Tom Tromey  <tom@tromey.com>
1862
1863         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1864         static.
1865
1866 2018-09-13  Tom Tromey  <tom@tromey.com>
1867
1868         * exec.c (try_open_exec_file): Use std::string.
1869
1870 2018-09-13  Tom Tromey  <tom@tromey.com>
1871
1872         * utils.h (gdb_bfd_errmsg): Return std::string.
1873         * exec.c (exec_file_attach): Update.
1874         * compile/compile-object-load.c (compile_object_load): Update.
1875         * utils.c (gdb_bfd_errmsg): Return std::string.
1876
1877 2018-09-13  Tom Tromey  <tom@tromey.com>
1878
1879         * procfs.c (struct procinfo_deleter): New.
1880         (procinfo_up): New typedef.
1881         (do_destroy_procinfo_cleanup): Remove.
1882         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1883
1884 2018-09-13  Tom Tromey  <tom@tromey.com>
1885
1886         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1887
1888 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1889 2018-09-13  Tom Tromey  <tom@tromey.com>
1890
1891         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1892         (pspy_get_objfiles): New function.
1893         (progspace_object_methods): New.
1894         (pspace_object_type): Add tp_methods callback.
1895         * python/python-internal.h (build_objfiles_list): New
1896         declaration.
1897         * python/python.c (build_objfiles_list): New function.
1898         (gdbpy_objfiles): Implement using build_objfiles_list.
1899         * NEWS: Mention the Progspace.objfiles method.
1900
1901 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1902
1903         * python/py-inferior.c (infpy_get_progspace): New function.
1904         (inferior_object_getset): Add progspace property.
1905         * NEWS: Mention the new property.
1906
1907 2018-09-13  Tom Tromey  <tom@tromey.com>
1908
1909         PR rust/23650:
1910         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1911
1912 2018-09-13  Tom Tromey  <tom@tromey.com>
1913
1914         PR rust/23626:
1915         * rust-lang.c (rust_enum_variant): Now static.
1916         (rust_empty_enum_p): New function.
1917         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1918         Handle empty enum.
1919
1920 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1921
1922         * python/py-inferior.c (infpy_repr): New.
1923         (inferior_object_type): Register infpy_repr.
1924         * python/py-objfile.c (objfpy_repr): New.
1925         (objfile_object_type): Register objfpy_repr.
1926
1927 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1928
1929         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1930
1931 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1932
1933         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1934         typo.
1935
1936 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1937
1938         * common/common-utils.c: Don't include '<sys/stat.h>'.
1939         (is_regular_file): Move to...
1940         * common/filestuff.c (is_regular_file): ... here.
1941         * common/common-utils.h (is_regular_file): Move to...
1942         * common/filestuff.h (is_regular_file): ... here.
1943
1944 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1945
1946         * skip.c (debug_skip): New variable.
1947         (skiplist_entry::do_skip_file_p): Add debug output.
1948         (skiplist_entry::do_skip_gfile_p): Likewise.
1949         (skiplist_entry::skip_function_p): Likewise.
1950         (_initialize_step_skip): Create debug command.
1951         * NEWS: Mention set/show debug skip.
1952
1953 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1954
1955         * darwin-nat.c (should_disable_startup_with_shell):
1956         New function.
1957         (darwin_nat_target::create_inferior): Add call.
1958
1959 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1960
1961         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1962         inf_port, msg_state>: Initialize.
1963         (struct darwin_thread_info) <signaled, single_step>: Change
1964         type and initialize.
1965         (struct darwin_thread_info) <event>: Initialize.
1966
1967 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1968
1969         PR gdb/23555
1970         PR gdb/23558
1971         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1972         guesses.
1973
1974 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1975
1976         Revert:
1977         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1978
1979         PR gdb/23555
1980         PR gdb/23558
1981         * gnulib/aclocal.m4: Regenerate.
1982         * gnulib/config.in: Regenerate.
1983         * gnulib/configure: Regenerate.
1984         * gnulib/import/Makefile.am: Update.
1985         * gnulib/import/Makefile.in: Update.
1986         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1987         * gnulib/import/_Noreturn.h: ... this.
1988         * gnulib/import/alloca.in.h: Update.
1989         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1990         * gnulib/import/arg-nonnull.h: ... this.
1991         * gnulib/import/assure.h: Update.
1992         * gnulib/import/at-func.c: Update.
1993         * gnulib/import/basename-lgpl.c: Update.
1994         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1995         * gnulib/import/c++defs.h: ... this.
1996         * gnulib/import/canonicalize-lgpl.c: Update.
1997         * gnulib/import/cdefs.h: Update.
1998         * gnulib/import/chdir-long.c: Update.
1999         * gnulib/import/chdir-long.h: Update.
2000         * gnulib/import/cloexec.c: Update.
2001         * gnulib/import/cloexec.h: Update.
2002         * gnulib/import/close.c: Update.
2003         * gnulib/import/closedir.c: Update.
2004         * gnulib/import/config.charset: Update.
2005         * gnulib/import/dirent-private.h: Update.
2006         * gnulib/import/dirent.in.h: Update.
2007         * gnulib/import/dirfd.c: Update.
2008         * gnulib/import/dirname-lgpl.c: Update.
2009         * gnulib/import/dirname.h: Update.
2010         * gnulib/import/dosname.h: Update.
2011         * gnulib/import/dup-safer-flag.c: Update.
2012         * gnulib/import/dup-safer.c: Update.
2013         * gnulib/import/dup.c: Update.
2014         * gnulib/import/dup2.c: Update.
2015         * gnulib/import/errno.in.h: Update.
2016         * gnulib/import/error.c: Update.
2017         * gnulib/import/error.h: Update.
2018         * gnulib/import/exitfail.c: Update.
2019         * gnulib/import/exitfail.h: Update.
2020         * gnulib/import/extra/update-copyright: Update.
2021         * gnulib/import/fchdir.c: Update.
2022         * gnulib/import/fcntl.c: Update.
2023         * gnulib/import/fcntl.in.h: Update.
2024         * gnulib/import/fd-hook.c: Update.
2025         * gnulib/import/fd-hook.h: Update.
2026         * gnulib/import/fd-safer-flag.c: Update.
2027         * gnulib/import/fd-safer.c: Update.
2028         * gnulib/import/fdopendir.c: Update.
2029         * gnulib/import/filename.h: Update.
2030         * gnulib/import/filenamecat-lgpl.c: Update.
2031         * gnulib/import/filenamecat.h: Update.
2032         * gnulib/import/flexmember.h: Update.
2033         * gnulib/import/float+.h: Update.
2034         * gnulib/import/float.c: Update.
2035         * gnulib/import/float.in.h: Update.
2036         * gnulib/import/fnmatch.c: Update.
2037         * gnulib/import/fnmatch.in.h: Update.
2038         * gnulib/import/fnmatch_loop.c: Update.
2039         * gnulib/import/fpucw.h: Update.
2040         * gnulib/import/frexp.c: Update.
2041         * gnulib/import/frexpl.c: Update.
2042         * gnulib/import/fstat.c: Update.
2043         * gnulib/import/fstatat.c: Update.
2044         * gnulib/import/getcwd-lgpl.c: Update.
2045         * gnulib/import/getcwd.c: Update.
2046         * gnulib/import/getdtablesize.c: Update.
2047         * gnulib/import/getlogin_r.c: Update.
2048         * gnulib/import/getprogname.c: Update.
2049         * gnulib/import/getprogname.h: Update.
2050         * gnulib/import/gettext.h: Update.
2051         * gnulib/import/gettimeofday.c: Update.
2052         * gnulib/import/glob-libc.h: Update.
2053         * gnulib/import/glob.c: Update.
2054         * gnulib/import/glob.in.h: Update.
2055         * gnulib/import/glob_internal.h: Update.
2056         * gnulib/import/glob_pattern_p.c: Update.
2057         * gnulib/import/globfree.c: Update.
2058         * gnulib/import/hard-locale.c: Update.
2059         * gnulib/import/hard-locale.h: Update.
2060         * gnulib/import/intprops.h: Update.
2061         * gnulib/import/inttypes.in.h: Update.
2062         * gnulib/import/isnan.c: Update.
2063         * gnulib/import/isnand-nolibm.h: Update.
2064         * gnulib/import/isnand.c: Update.
2065         * gnulib/import/isnanl-nolibm.h: Update.
2066         * gnulib/import/isnanl.c: Update.
2067         * gnulib/import/itold.c: Update.
2068         * gnulib/import/libc-config.h: Update.
2069         * gnulib/import/limits.in.h: Update.
2070         * gnulib/import/localcharset.c: Update.
2071         * gnulib/import/localcharset.h: Update.
2072         * gnulib/import/localtime-buffer.c: Update.
2073         * gnulib/import/localtime-buffer.h: Update.
2074         * gnulib/import/lstat.c: Update.
2075         * gnulib/import/m4/00gnulib.m4: Update.
2076         * gnulib/import/m4/__inline.m4: Update.
2077         * gnulib/import/m4/absolute-header.m4: Update.
2078         * gnulib/import/m4/alloca.m4: Update.
2079         * gnulib/import/m4/builtin-expect.m4: Update.
2080         * gnulib/import/m4/canonicalize.m4: Update.
2081         * gnulib/import/m4/chdir-long.m4: Update.
2082         * gnulib/import/m4/close.m4: Update.
2083         * gnulib/import/m4/closedir.m4: Update.
2084         * gnulib/import/m4/configmake.m4: Update.
2085         * gnulib/import/m4/d-ino.m4: Update.
2086         * gnulib/import/m4/d-type.m4: Update.
2087         * gnulib/import/m4/dirent_h.m4: Update.
2088         * gnulib/import/m4/dirfd.m4: Update.
2089         * gnulib/import/m4/dirname.m4: Update.
2090         * gnulib/import/m4/double-slash-root.m4: Update.
2091         * gnulib/import/m4/dup.m4: Update.
2092         * gnulib/import/m4/dup2.m4: Update.
2093         * gnulib/import/m4/eealloc.m4: Update.
2094         * gnulib/import/m4/environ.m4: Update.
2095         * gnulib/import/m4/errno_h.m4: Update.
2096         * gnulib/import/m4/error.m4: Update.
2097         * gnulib/import/m4/exponentd.m4: Update.
2098         * gnulib/import/m4/exponentl.m4: Update.
2099         * gnulib/import/m4/extensions.m4: Update.
2100         * gnulib/import/m4/extern-inline.m4: Update.
2101         * gnulib/import/m4/fchdir.m4: Update.
2102         * gnulib/import/m4/fcntl-o.m4: Update.
2103         * gnulib/import/m4/fcntl.m4: Update.
2104         * gnulib/import/m4/fcntl_h.m4: Update.
2105         * gnulib/import/m4/fdopendir.m4: Update.
2106         * gnulib/import/m4/filenamecat.m4: Update.
2107         * gnulib/import/m4/flexmember.m4: Update.
2108         * gnulib/import/m4/float_h.m4: Update.
2109         * gnulib/import/m4/fnmatch.m4: Update.
2110         * gnulib/import/m4/fnmatch_h.m4: Update.
2111         * gnulib/import/m4/fpieee.m4: Update.
2112         * gnulib/import/m4/frexp.m4: Update.
2113         * gnulib/import/m4/frexpl.m4: Update.
2114         * gnulib/import/m4/fstat.m4: Update.
2115         * gnulib/import/m4/fstatat.m4: Update.
2116         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2117         * gnulib/import/m4/getcwd-path-max.m4: Update.
2118         * gnulib/import/m4/getcwd.m4: Update.
2119         * gnulib/import/m4/getdtablesize.m4: Update.
2120         * gnulib/import/m4/getlogin.m4: Update.
2121         * gnulib/import/m4/getlogin_r.m4: Update.
2122         * gnulib/import/m4/getpagesize.m4: Update.
2123         * gnulib/import/m4/getprogname.m4: Update.
2124         * gnulib/import/m4/gettimeofday.m4: Update.
2125         * gnulib/import/m4/glibc21.m4: Update.
2126         * gnulib/import/m4/glob.m4: Update.
2127         * gnulib/import/m4/glob_h.m4: Update.
2128         * gnulib/import/m4/gnulib-cache.m4: Update.
2129         * gnulib/import/m4/gnulib-common.m4: Update.
2130         * gnulib/import/m4/gnulib-comp.m4: Update.
2131         * gnulib/import/m4/gnulib-tool.m4: Update.
2132         * gnulib/import/m4/hard-locale.m4: Update.
2133         * gnulib/import/m4/include_next.m4: Update.
2134         * gnulib/import/m4/inttypes-pri.m4: Update.
2135         * gnulib/import/m4/inttypes.m4: Update.
2136         * gnulib/import/m4/isnand.m4: Update.
2137         * gnulib/import/m4/isnanl.m4: Update.
2138         * gnulib/import/m4/largefile.m4: Update.
2139         * gnulib/import/m4/limits-h.m4: Update.
2140         * gnulib/import/m4/localcharset.m4: Update.
2141         * gnulib/import/m4/locale-fr.m4: Update.
2142         * gnulib/import/m4/locale-ja.m4: Update.
2143         * gnulib/import/m4/locale-zh.m4: Update.
2144         * gnulib/import/m4/localtime-buffer.m4: Update.
2145         * gnulib/import/m4/longlong.m4: Update.
2146         * gnulib/import/m4/lstat.m4: Update.
2147         * gnulib/import/m4/malloc.m4: Update.
2148         * gnulib/import/m4/malloca.m4: Update.
2149         * gnulib/import/m4/math_h.m4: Update.
2150         * gnulib/import/m4/mbrtowc.m4: Update.
2151         * gnulib/import/m4/mbsinit.m4: Update.
2152         * gnulib/import/m4/mbsrtowcs.m4: Update.
2153         * gnulib/import/m4/mbstate_t.m4: Update.
2154         * gnulib/import/m4/memchr.m4: Update.
2155         * gnulib/import/m4/memmem.m4: Update.
2156         * gnulib/import/m4/mempcpy.m4: Update.
2157         * gnulib/import/m4/memrchr.m4: Update.
2158         * gnulib/import/m4/mkdir.m4: Update.
2159         * gnulib/import/m4/mkstemp.m4: Update.
2160         * gnulib/import/m4/mmap-anon.m4: Update.
2161         * gnulib/import/m4/mode_t.m4: Update.
2162         * gnulib/import/m4/msvc-inval.m4: Update.
2163         * gnulib/import/m4/msvc-nothrow.m4: Update.
2164         * gnulib/import/m4/multiarch.m4: Update.
2165         * gnulib/import/m4/nocrash.m4: Update.
2166         * gnulib/import/m4/off_t.m4: Update.
2167         * gnulib/import/m4/onceonly.m4: Update.
2168         * gnulib/import/m4/open-cloexec.m4: Update.
2169         * gnulib/import/m4/open.m4: Update.
2170         * gnulib/import/m4/openat.m4: Update.
2171         * gnulib/import/m4/opendir.m4: Update.
2172         * gnulib/import/m4/pathmax.m4: Update.
2173         * gnulib/import/m4/rawmemchr.m4: Update.
2174         * gnulib/import/m4/readdir.m4: Update.
2175         * gnulib/import/m4/readlink.m4: Update.
2176         * gnulib/import/m4/realloc.m4: Update.
2177         * gnulib/import/m4/rename.m4: Update.
2178         * gnulib/import/m4/rewinddir.m4: Update.
2179         * gnulib/import/m4/rmdir.m4: Update.
2180         * gnulib/import/m4/save-cwd.m4: Update.
2181         * gnulib/import/m4/secure_getenv.m4: Update.
2182         * gnulib/import/m4/setenv.m4: Update.
2183         * gnulib/import/m4/signal_h.m4: Update.
2184         * gnulib/import/m4/ssize_t.m4: Update.
2185         * gnulib/import/m4/stat-time.m4: Update.
2186         * gnulib/import/m4/stat.m4: Update.
2187         * gnulib/import/m4/std-gnu11.m4: Update.
2188         * gnulib/import/m4/stdbool.m4: Update.
2189         * gnulib/import/m4/stddef_h.m4: Update.
2190         * gnulib/import/m4/stdint.m4: Update.
2191         * gnulib/import/m4/stdio_h.m4: Update.
2192         * gnulib/import/m4/stdlib_h.m4: Update.
2193         * gnulib/import/m4/strchrnul.m4: Update.
2194         * gnulib/import/m4/strdup.m4: Update.
2195         * gnulib/import/m4/strerror.m4: Update.
2196         * gnulib/import/m4/string_h.m4: Update.
2197         * gnulib/import/m4/strstr.m4: Update.
2198         * gnulib/import/m4/strtok_r.m4: Update.
2199         * gnulib/import/m4/sys_socket_h.m4: Update.
2200         * gnulib/import/m4/sys_stat_h.m4: Update.
2201         * gnulib/import/m4/sys_time_h.m4: Update.
2202         * gnulib/import/m4/sys_types_h.m4: Update.
2203         * gnulib/import/m4/tempname.m4: Update.
2204         * gnulib/import/m4/time_h.m4: Update.
2205         * gnulib/import/m4/unistd-safer.m4: Update.
2206         * gnulib/import/m4/unistd_h.m4: Update.
2207         * gnulib/import/m4/warn-on-use.m4: Update.
2208         * gnulib/import/m4/wchar_h.m4: Update.
2209         * gnulib/import/m4/wchar_t.m4: Update.
2210         * gnulib/import/m4/wctype_h.m4: Update.
2211         * gnulib/import/m4/wint_t.m4: Update.
2212         * gnulib/import/malloc.c: Update.
2213         * gnulib/import/malloc/scratch_buffer.h: Update.
2214         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2215         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2216         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2217         * gnulib/import/malloca.c: Update.
2218         * gnulib/import/malloca.h: Update.
2219         * gnulib/import/malloca.valgrind: Update.
2220         * gnulib/import/math.in.h: Update.
2221         * gnulib/import/mbrtowc.c: Update.
2222         * gnulib/import/mbsinit.c: Update.
2223         * gnulib/import/mbsrtowcs-impl.h: Update.
2224         * gnulib/import/mbsrtowcs-state.c: Update.
2225         * gnulib/import/mbsrtowcs.c: Update.
2226         * gnulib/import/memchr.c: Update.
2227         * gnulib/import/memmem.c: Update.
2228         * gnulib/import/mempcpy.c: Update.
2229         * gnulib/import/memrchr.c: Update.
2230         * gnulib/import/mkdir.c: Update.
2231         * gnulib/import/mkstemp.c: Update.
2232         * gnulib/import/msvc-inval.c: Update.
2233         * gnulib/import/msvc-inval.h: Update.
2234         * gnulib/import/msvc-nothrow.c: Update.
2235         * gnulib/import/msvc-nothrow.h: Update.
2236         * gnulib/import/open.c: Update.
2237         * gnulib/import/openat-die.c: Update.
2238         * gnulib/import/openat-priv.h: Update.
2239         * gnulib/import/openat-proc.c: Update.
2240         * gnulib/import/openat.c: Update.
2241         * gnulib/import/openat.h: Update.
2242         * gnulib/import/opendir.c: Update.
2243         * gnulib/import/pathmax.h: Update.
2244         * gnulib/import/pipe-safer.c: Update.
2245         * gnulib/import/rawmemchr.c: Update.
2246         * gnulib/import/readdir.c: Update.
2247         * gnulib/import/readlink.c: Update.
2248         * gnulib/import/realloc.c: Update.
2249         * gnulib/import/ref-add.sin: Update.
2250         * gnulib/import/ref-del.sin: Update.
2251         * gnulib/import/rename.c: Update.
2252         * gnulib/import/rewinddir.c: Update.
2253         * gnulib/import/rmdir.c: Update.
2254         * gnulib/import/same-inode.h: Update.
2255         * gnulib/import/save-cwd.c: Update.
2256         * gnulib/import/save-cwd.h: Update.
2257         * gnulib/import/scratch_buffer.h: Update.
2258         * gnulib/import/secure_getenv.c: Update.
2259         * gnulib/import/setenv.c: Update.
2260         * gnulib/import/signal.in.h: Update.
2261         * gnulib/import/stat-time.c: Update.
2262         * gnulib/import/stat-time.h: Update.
2263         * gnulib/import/stat-w32.c: Update.
2264         * gnulib/import/stat-w32.h: Update.
2265         * gnulib/import/stat.c: Update.
2266         * gnulib/import/stdbool.in.h: Update.
2267         * gnulib/import/stddef.in.h: Update.
2268         * gnulib/import/stdint.in.h: Update.
2269         * gnulib/import/stdio.in.h: Update.
2270         * gnulib/import/stdlib.in.h: Update.
2271         * gnulib/import/str-two-way.h: Update.
2272         * gnulib/import/strchrnul.c: Update.
2273         * gnulib/import/strdup.c: Update.
2274         * gnulib/import/streq.h: Update.
2275         * gnulib/import/strerror-override.c: Update.
2276         * gnulib/import/strerror-override.h: Update.
2277         * gnulib/import/strerror.c: Update.
2278         * gnulib/import/string.in.h: Update.
2279         * gnulib/import/stripslash.c: Update.
2280         * gnulib/import/strnlen1.c: Update.
2281         * gnulib/import/strnlen1.h: Update.
2282         * gnulib/import/strstr.c: Update.
2283         * gnulib/import/strtok_r.c: Update.
2284         * gnulib/import/sys_stat.in.h: Update.
2285         * gnulib/import/sys_time.in.h: Update.
2286         * gnulib/import/sys_types.in.h: Update.
2287         * gnulib/import/tempname.c: Update.
2288         * gnulib/import/tempname.h: Update.
2289         * gnulib/import/time.in.h: Update.
2290         * gnulib/import/unistd--.h: Update.
2291         * gnulib/import/unistd-safer.h: Update.
2292         * gnulib/import/unistd.in.h: Update.
2293         * gnulib/import/unsetenv.c: Update.
2294         * gnulib/import/verify.h: Update.
2295         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2296         * gnulib/import/wchar.in.h: Update.
2297         * gnulib/import/wctype.in.h: Update.
2298         * gnulib/import/xalloc-oversized.h: Update.
2299         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2300         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2301
2302 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2303
2304         * record-btrace.c (get_thread_current_frame): Remove
2305         old_inferior_ptid.
2306
2307 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2308
2309         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2310         with check_tag to 1 if and only if the type is tagged and the
2311         component being searched cannot been found in the current
2312         view. Otherwise, always call ada_to_fixed_type with
2313         check_tag to 0.
2314
2315 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2316
2317         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2318         declaration.
2319         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2320         * ada-varobj.c (ada_varobj_get_number_of_children,
2321         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2322
2323 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2324
2325         * ada-valprint.c (ada_value_print): Use type instead of
2326         enclosing type.
2327
2328 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2329
2330         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2331         an array of access to unconstrained array.
2332
2333 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2334
2335         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2336         (ada_check_typedef): Use it.
2337
2338 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2339
2340         * ada-varobj.c (ada_varobj_describe_struct_child)
2341         (ada_varobj_describe_child): Handle union case like struct one.
2342
2343 2018-09-10  Tom Tromey  <tom@tromey.com>
2344
2345         PR python/18380:
2346         * python/python.c (_initialize_python): Make example in "python"
2347         help work in Python 3.
2348
2349 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2350
2351         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2352         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2353         $(EXEEXT) to the script, as it is not a program.
2354
2355 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2356
2357         * python/py-prettyprint.c (pretty_print_one_value): Return
2358         gdbpy_ref<>.
2359         (print_string_repr): Adjust.
2360         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2361         * python/python-internal.h (apply_varobj_pretty_printer): Return
2362         gdbpy_ref<>.
2363         * varobj.c (varobj_value_get_print_value): Adjust.
2364
2365 2018-09-08  Tom Tromey  <tom@tromey.com>
2366
2367         PR python/16047:
2368         * python/py-prettyprint.c (pretty_print_one_value): Check for
2369         to_string method.
2370
2371 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2372
2373         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2374         replace_operator_with_call.
2375
2376 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2377
2378         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2379
2380 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2381
2382         * ada-typeprint.c (print_range): Print the bounds using TYPE
2383         rather than its TYPE_TARGET_TYPE.
2384
2385 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2386
2387         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2388         call to ada_to_fixed_value_create.
2389
2390 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2391
2392         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2393
2394 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2395
2396         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2397         by calls to error.
2398
2399 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2400
2401         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2402         Move update of loop variable "fi".
2403
2404 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2405
2406         * ada-lang.c (value_assign_to_component): In the case of
2407         big-endian targets, extract the bits of the given VAL
2408         using an src_offset of zero if container is not a scalar.
2409
2410 2018-09-06  Simon Ser  <contact@emersion.fr>
2411
2412         PR gdb/23105
2413         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2414         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2415         * fbsd-tdep.c (fbsd_make_note_desc): New.
2416         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2417         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2418         * target.h (enum target_object) Add FreeBSD-specific
2419         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2420
2421 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2422
2423         * compile/compile-c.h (generate_c_for_variable_locations):
2424         Change reference to pointer.
2425         * compile/compile-c-support.c (compile_program) <compute>:
2426         Likewise.
2427         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2428         (generate_c_for_for_one_variable): Likewise
2429         (generate_c_for_variable_locations): Likewise
2430         * compile/compile-c-types.c (compile_c_instance::convert_type):
2431         Likewise
2432         * compile/compile-cplus-symbols.c (convert_one_symbol):
2433         std::move the scope passed to enter_scope.
2434         * compile/compile-cplus-types.c
2435         (compile_cplus_instance::enter_scope): Make parameter
2436         rvalue-reference.
2437         (compile_cplus_instance::new_scope): Change reference to
2438         pointer.
2439         (compile_cplus_instance::convert_type): Likewise
2440         (compile_cplus_convert_typedef): std::move the scope passed to
2441         enter_scope.
2442         (compile_cplus_convert_struct_or_union): Likewise.
2443         (compile_cplus_convert_enum): Likewise.
2444         (compile_cplus_convert_namespace): Likewise.
2445         * compile/compile-cplus.h (compile_cplus_instance)
2446         <enter_scope>: Make parameter rvalue-reference.
2447         * compile/compile-internal.h (compile_instance)
2448         <get_cached_type>: Likewise
2449         * compile/compile-loc2c.c (push): Likewise
2450         (pushf): Likewise
2451         (unary): Likewise
2452         (binary): Likewise
2453         (print_label): Likewise
2454         (pushf_register_address): Likewise
2455         (pushf_register): Likewise
2456         (do_compile_dwarf_expr_to_c): Likewise
2457         (compile_dwarf_expr_to_c): Likewise
2458         (compile_dwarf_bounds_to_c): Likewise
2459         * compile/compile.c (compile_instance::get_cached_type):
2460         Likewise
2461         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2462         (compile_dwarf_bounds_to_c): Likewise
2463         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2464         (dwarf2_compile_property_to_c): Likewise
2465         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2466         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2467         Likewise
2468
2469 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2470
2471         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2472         * tui/tui-data.c (init_content_element): Don't initialize it.
2473
2474 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2475
2476         * tui/tui-data.h (struct tui_win_info)
2477         <detail::opaque>: Remove.
2478         * tui/tui-data.c (init_win_info): Remove assignment.
2479
2480 2018-09-05  Tom Tromey  <tom@tromey.com>
2481
2482         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2483         -Wformat-nonliteral.
2484         * target-float.c (host_float_ops<T>::to_string)
2485         (host_float_ops<T>::from_string): Use
2486         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2487         * configure: Rebuild.
2488
2489 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2490
2491         * printcmd.c (printf_c_string): Use
2492         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2493         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2494
2495 2018-09-05  Tom Tromey  <tom@tromey.com>
2496
2497         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2498
2499 2018-09-05  Tom de Vries  <tdevries@suse.de>
2500
2501         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2502         with resolve_abstract_p == true.
2503         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2504         defaulting to false. Propagate resolve_abstract_p to
2505         dwarf2_fetch_die_loc_sect_off.
2506         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2507         parameter, defaulting to false.
2508         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2509         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2510         parameter.
2511         * dwarf2read.h (struct die_info): Forward-declare.
2512         (die_info_ptr): New typedef.
2513         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2514
2515 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2516
2517         GDB 8.2 released.
2518
2519 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2520             Pedro Alves  <palves@redhat.com>
2521
2522         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2523         "aclocal-m4-deps.mk".  Include file here.
2524         $(srcdir)/aclocal.m4: Add "configure.ac".
2525         * gnulib/aclocal-m4-deps.mk: New file.
2526         * gnulib/update-gnulib.sh: Automatically update
2527         "aclocal-m4-deps.mk".
2528
2529 2018-09-04  Tom Tromey  <tom@tromey.com>
2530
2531         * configure: Rebuild.
2532         * configure.ac: Remove multi-ice code.
2533
2534 2018-09-04  Tom Tromey  <tom@tromey.com>
2535
2536         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2537         (ada-exp.o): Update.
2538
2539 2018-09-04  Tom Tromey  <tom@tromey.com>
2540
2541         * Makefile.in (printcmd.o, target-float.o): Remove.
2542         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2543
2544 2018-09-04  Tom Tromey  <tom@tromey.com>
2545
2546         * gnulib/Makefile.in: Remove obsolete comment.
2547         * Makefile.in: Remove obsolete comment.
2548
2549 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2550
2551         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2552         line with '+'.
2553
2554 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2555
2556         * riscv-tdep.c: Add 'prologue-value.h' include.
2557         (struct riscv_unwind_cache): New struct.
2558         (riscv_debug_unwinder): New global.
2559         (riscv_scan_prologue): Update arguments, capture register details
2560         from prologue scan.
2561         (riscv_skip_prologue): Reformat arguments line, move end of
2562         prologue calculation into riscv_scan_prologue.
2563         (riscv_frame_cache): Update return type, create
2564         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2565         details.
2566         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2567         (riscv_frame_prev_register): Use the trad_frame within the
2568         riscv_unwind_cache.
2569         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2570         flag.
2571
2572 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2573
2574         * trad-frame.h (trad_frame_set_realreg): Declare.
2575         (trad_frame_set_addr): Declare.
2576         * trad-frame.c (trad_frame_set_realreg): Define new function.
2577         (trad_frame_set_addr): Define new function.
2578         (trad_frame_set_reg_realreg): Use new function.
2579         (trad_frame_set_reg_addr): Use new function.
2580
2581 2018-09-01  Keith Seitz  <keiths@redhat.com>
2582
2583         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2584         pulongest instead of "%lld".
2585         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2586         ATTRIBUTE_UNUSED.
2587
2588 2018-08-31  Tom Tromey  <tom@tromey.com>
2589
2590         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2591         variant part type.
2592
2593 2018-08-31  Pedro Alves  <palves@redhat.com>
2594
2595         * gdbarch.h: Regenerate.
2596
2597 2018-08-31  Pedro Alves  <palves@redhat.com>
2598
2599         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2600         * target.h (Hardware watchpoint interfaces): Describe
2601         continuable/steppable/non-steppable watchpoints.
2602         * gdbarch.h, gdbarch.c: Regenerate.
2603
2604 2018-08-31  Pedro Alves  <palves@redhat.com>
2605
2606         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2607         Delete.
2608         * s390-linux-nat.c
2609         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2610         * target.h (target_ops::have_continuable_watchpoint): Delete.
2611         (target_have_continuable_watchpoint): Delete.
2612         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2613         * target-delegates.c: Regenerate.
2614
2615 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2616
2617         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2618         the files present in "gnulib/import/m4/".
2619
2620 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2621
2622         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2623         c.sw, c.swsp, and c.sdsp.
2624
2625 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2626
2627         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2628         (riscv_read_misa_reg): Don't cache value read into inferior data.
2629         (riscv_new_inferior_data): Delete.
2630         (riscv_inferior_data_cleanup): Delete.
2631         (riscv_inferior_data): Delete.
2632         (riscv_invalidate_inferior_data): Delete.
2633         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2634
2635 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2636
2637         * compile/compile-cplus-types.c
2638         (compile_cplus_instance::leave_scope): Take the address of scope
2639         object.
2640         (compile_cplus_instance::convert_qualified_base): Compare quals
2641         to 0.
2642
2643 2018-08-30  Keith Seitz  <keiths@redhat.com>
2644
2645         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2646         Use "%s" and host_address_to_string instead of "%p" in printf.
2647
2648 2018-08-29  Keith Seitz  <keiths@redhat.com>
2649
2650         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2651         and compile-cplus-types.c.
2652         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2653         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2654         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2655         Declare.
2656         * compile/compile-c-support.c: Include compile-cplus.h.
2657         (load_libcompile): Templatize.
2658         (get_compile_context): "New" function.
2659         (c_get_compile_context): Use get_compile_context.
2660         (cplus_get_compile_context): New function.
2661         (cplus_push_user_expression, cplus_pop_user_expression)
2662         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2663         (cplus_compute_program): Define new structs/functions.
2664         * compile/compile-cplus-symmbols.c: New file.
2665         * compile/compile-cplus-types.c: New file.
2666         * compile/compile-cplus.h: New file.
2667         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2668         Declare.
2669         * compile/compile-object-load.c (get_out_value_type): Use
2670         strncmp_iw when comparing symbol names.
2671         (compile_object_load): Add mst_bss and mst_data.
2672         * compile/compile.c (_initialize_compile): Remove
2673         -Wno-implicit-function-declaration from `compile_args'.
2674         * compile/gcc-cp-plugin.h: New file.
2675         * NEWS: Mention C++ compile support and new debug options.
2676
2677 2018-08-29  Keith Seitz  <keiths@redhat.com>
2678
2679         * linespec.c (collect_info::add_symbol): Make virtual.
2680         (struct symbol_searcher_collect_info): New struct.
2681         (symbol_searcher::find_all_symbols): New method.
2682         * symtab.h (class symbol_searcher): New class.
2683
2684 2018-08-29  Keith Seitz  <keiths@redhat.com>
2685
2686         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2687         Change to vector of block_symbol.  Update all users.
2688         (struct collect_info) <symbols>: Likewise.
2689         (collect_info::add_symbol): Take block_symbol as argument.
2690         Update all callers.
2691         (decode_compound_collector) <m_symbols>: Change type to vector
2692         of block_symbol.  Update all users.
2693         (decode_compound_collector::operator ()): Change parameter type
2694         to block_symbol.
2695         (find_method, find_function_symbols, find_linespec_symbols)
2696         (find_label_symbols_in_block, find_label_symbols): Change symbol
2697         vectors to block_symbol vectors.
2698         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2699         block_symbol.
2700
2701 2018-08-29  Keith Seitz  <keiths@redhat.com>
2702
2703         * linespec.c (symbolp): Remove typedef and VEC definitions.
2704         (bound_minimal_symbol_d): Likewise.
2705
2706 2018-08-29  Keith Seitz  <keiths@redhat.com>
2707
2708         * linespec.c (decode_compound_collector::decode_compound_collector):
2709         Remove initialization for `m_symtabs'.
2710         (decode_compound_collector::release_symbols): Change return type
2711         to std::vector.  Update all callers.
2712         (class decode_compound_collector) <m_symbols>: Change type to
2713         std::vector.
2714         (lookup_prefix_sym): Change return type to std::vector.  Update all
2715         callers.
2716         (compare_symbols): Remove.
2717         (std_compare_symbols): Rename to `compare_symbols'.
2718         (find_method): Change `sym_classes' parameter to std::vector.
2719         Update all callers.  Use std::sort to sort sym_classes.
2720         (find_linespec_symbols): Remove cleanup.
2721
2722 2018-08-29  Keith Seitz  <keiths@redhat.com>
2723
2724         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2725         std::vector.  Update all users.
2726         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2727         (struct collect_info) <minimal_symbols>: Likewise.
2728         (compare_msymbols): Return bool.  Change parameters to const
2729         bound_minimal_symbol references.
2730         (find_method, find_function_symbols, find_linespec_symbols): Change
2731         `minsyms' parameter to std::vector.  Update all callers.
2732
2733 2018-08-29  Keith Seitz  <keiths@redhat.com>
2734
2735         * linespec.c (struct linespec) <label_symbols>: Change type to
2736         std::vector.  Update all users.
2737         (find_label_symbols_in_block): Change `result' parameter to
2738         std::vector.  Update all callers.
2739         (find_label_symbols): Return std::vector.  Update all callers.
2740
2741 2018-08-29  Keith Seitz  <keiths@redhat.com>
2742
2743         * linespec.c (struct linespec) <function_symbols>: Change type to
2744         std::vector.  Update all users.
2745         (struct collect_info) <function_symbols>: Likewise.
2746         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2747         (std_compare_symbols): New function.
2748         (find_method, find_function_symbols, find_linespec_symbols)
2749         (find_label_symbols_in_block): Change `symbols' parameter to
2750         std::vector.  Update all callers.
2751         (find_label_symbols): Likewise for `function_symbols' and
2752         `label_funcs_ret'.
2753
2754 2018-08-29  Keith Seitz  <keiths@redhat.com>
2755
2756         * linespec.c (symtab_vector_up): Define.
2757         (struct linespec) <file_symtabs>: Change type to std::vector *.
2758         Update all uses.
2759         (struct collect_info) <file_symtabs>: Likewise.
2760         (collect_symtabs_from_filename): Return symtab_vector_up.
2761         Update all callers.
2762         (decode_objc): Remove cleanup.
2763         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2764         (symtab_collector::release_symtabs): Return symtab_vector_up.
2765         Update all callers.
2766         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2767         Update all users.
2768         (collect_symtabs_from_filename, symtabs_from_filename): Return
2769         symtab_vector_up.  Update all callers.
2770
2771 2018-08-29  Tom Tromey  <tom@tromey.com>
2772
2773         * csky-tdep.c (csky_analyze_prologue): Use
2774         core_addr_to_string_nz.
2775
2776 2018-08-29  Tom Tromey  <tom@tromey.com>
2777
2778         * windows-nat.c (struct xlate_exception) <them>: Change type to
2779         DWORD.
2780         (xlate): Fix formatting.  Remove last entry.
2781         (struct xlate_exception, xlate): Comment out.
2782         (windows_nat_target::resume): Use ranged for.
2783
2784 2018-08-29  Jim Wilson  <jimw@sifive.com>
2785
2786         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2787         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2788         of NT_PRFPREG.
2789         (riscv_linux_nat_target::store_registers): Likewise.
2790
2791 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2792
2793         PR gdb/23555
2794         PR gdb/23558
2795         * gnulib/aclocal.m4: Regenerate.
2796         * gnulib/config.in: Regenerate.
2797         * gnulib/configure: Regenerate.
2798         * gnulib/import/Makefile.am: Update.
2799         * gnulib/import/Makefile.in: Update.
2800         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2801         * gnulib/import/_Noreturn.h: ... this.
2802         * gnulib/import/alloca.in.h: Update.
2803         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2804         * gnulib/import/arg-nonnull.h: ... this.
2805         * gnulib/import/assure.h: Update.
2806         * gnulib/import/at-func.c: Update.
2807         * gnulib/import/basename-lgpl.c: Update.
2808         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2809         * gnulib/import/c++defs.h: ... this.
2810         * gnulib/import/canonicalize-lgpl.c: Update.
2811         * gnulib/import/cdefs.h: Update.
2812         * gnulib/import/chdir-long.c: Update.
2813         * gnulib/import/chdir-long.h: Update.
2814         * gnulib/import/cloexec.c: Update.
2815         * gnulib/import/cloexec.h: Update.
2816         * gnulib/import/close.c: Update.
2817         * gnulib/import/closedir.c: Update.
2818         * gnulib/import/config.charset: Update.
2819         * gnulib/import/dirent-private.h: Update.
2820         * gnulib/import/dirent.in.h: Update.
2821         * gnulib/import/dirfd.c: Update.
2822         * gnulib/import/dirname-lgpl.c: Update.
2823         * gnulib/import/dirname.h: Update.
2824         * gnulib/import/dosname.h: Update.
2825         * gnulib/import/dup-safer-flag.c: Update.
2826         * gnulib/import/dup-safer.c: Update.
2827         * gnulib/import/dup.c: Update.
2828         * gnulib/import/dup2.c: Update.
2829         * gnulib/import/errno.in.h: Update.
2830         * gnulib/import/error.c: Update.
2831         * gnulib/import/error.h: Update.
2832         * gnulib/import/exitfail.c: Update.
2833         * gnulib/import/exitfail.h: Update.
2834         * gnulib/import/extra/update-copyright: Update.
2835         * gnulib/import/fchdir.c: Update.
2836         * gnulib/import/fcntl.c: Update.
2837         * gnulib/import/fcntl.in.h: Update.
2838         * gnulib/import/fd-hook.c: Update.
2839         * gnulib/import/fd-hook.h: Update.
2840         * gnulib/import/fd-safer-flag.c: Update.
2841         * gnulib/import/fd-safer.c: Update.
2842         * gnulib/import/fdopendir.c: Update.
2843         * gnulib/import/filename.h: Update.
2844         * gnulib/import/filenamecat-lgpl.c: Update.
2845         * gnulib/import/filenamecat.h: Update.
2846         * gnulib/import/flexmember.h: Update.
2847         * gnulib/import/float+.h: Update.
2848         * gnulib/import/float.c: Update.
2849         * gnulib/import/float.in.h: Update.
2850         * gnulib/import/fnmatch.c: Update.
2851         * gnulib/import/fnmatch.in.h: Update.
2852         * gnulib/import/fnmatch_loop.c: Update.
2853         * gnulib/import/fpucw.h: Update.
2854         * gnulib/import/frexp.c: Update.
2855         * gnulib/import/frexpl.c: Update.
2856         * gnulib/import/fstat.c: Update.
2857         * gnulib/import/fstatat.c: Update.
2858         * gnulib/import/getcwd-lgpl.c: Update.
2859         * gnulib/import/getcwd.c: Update.
2860         * gnulib/import/getdtablesize.c: Update.
2861         * gnulib/import/getlogin_r.c: Update.
2862         * gnulib/import/getprogname.c: Update.
2863         * gnulib/import/getprogname.h: Update.
2864         * gnulib/import/gettext.h: Update.
2865         * gnulib/import/gettimeofday.c: Update.
2866         * gnulib/import/glob-libc.h: Update.
2867         * gnulib/import/glob.c: Update.
2868         * gnulib/import/glob.in.h: Update.
2869         * gnulib/import/glob_internal.h: Update.
2870         * gnulib/import/glob_pattern_p.c: Update.
2871         * gnulib/import/globfree.c: Update.
2872         * gnulib/import/hard-locale.c: Update.
2873         * gnulib/import/hard-locale.h: Update.
2874         * gnulib/import/intprops.h: Update.
2875         * gnulib/import/inttypes.in.h: Update.
2876         * gnulib/import/isnan.c: Update.
2877         * gnulib/import/isnand-nolibm.h: Update.
2878         * gnulib/import/isnand.c: Update.
2879         * gnulib/import/isnanl-nolibm.h: Update.
2880         * gnulib/import/isnanl.c: Update.
2881         * gnulib/import/itold.c: Update.
2882         * gnulib/import/libc-config.h: Update.
2883         * gnulib/import/limits.in.h: Update.
2884         * gnulib/import/localcharset.c: Update.
2885         * gnulib/import/localcharset.h: Update.
2886         * gnulib/import/localtime-buffer.c: Update.
2887         * gnulib/import/localtime-buffer.h: Update.
2888         * gnulib/import/lstat.c: Update.
2889         * gnulib/import/m4/00gnulib.m4: Update.
2890         * gnulib/import/m4/__inline.m4: Update.
2891         * gnulib/import/m4/absolute-header.m4: Update.
2892         * gnulib/import/m4/alloca.m4: Update.
2893         * gnulib/import/m4/builtin-expect.m4: Update.
2894         * gnulib/import/m4/canonicalize.m4: Update.
2895         * gnulib/import/m4/chdir-long.m4: Update.
2896         * gnulib/import/m4/close.m4: Update.
2897         * gnulib/import/m4/closedir.m4: Update.
2898         * gnulib/import/m4/configmake.m4: Update.
2899         * gnulib/import/m4/d-ino.m4: Update.
2900         * gnulib/import/m4/d-type.m4: Update.
2901         * gnulib/import/m4/dirent_h.m4: Update.
2902         * gnulib/import/m4/dirfd.m4: Update.
2903         * gnulib/import/m4/dirname.m4: Update.
2904         * gnulib/import/m4/double-slash-root.m4: Update.
2905         * gnulib/import/m4/dup.m4: Update.
2906         * gnulib/import/m4/dup2.m4: Update.
2907         * gnulib/import/m4/eealloc.m4: Update.
2908         * gnulib/import/m4/environ.m4: Update.
2909         * gnulib/import/m4/errno_h.m4: Update.
2910         * gnulib/import/m4/error.m4: Update.
2911         * gnulib/import/m4/exponentd.m4: Update.
2912         * gnulib/import/m4/exponentl.m4: Update.
2913         * gnulib/import/m4/extensions.m4: Update.
2914         * gnulib/import/m4/extern-inline.m4: Update.
2915         * gnulib/import/m4/fchdir.m4: Update.
2916         * gnulib/import/m4/fcntl-o.m4: Update.
2917         * gnulib/import/m4/fcntl.m4: Update.
2918         * gnulib/import/m4/fcntl_h.m4: Update.
2919         * gnulib/import/m4/fdopendir.m4: Update.
2920         * gnulib/import/m4/filenamecat.m4: Update.
2921         * gnulib/import/m4/flexmember.m4: Update.
2922         * gnulib/import/m4/float_h.m4: Update.
2923         * gnulib/import/m4/fnmatch.m4: Update.
2924         * gnulib/import/m4/fnmatch_h.m4: Update.
2925         * gnulib/import/m4/fpieee.m4: Update.
2926         * gnulib/import/m4/frexp.m4: Update.
2927         * gnulib/import/m4/frexpl.m4: Update.
2928         * gnulib/import/m4/fstat.m4: Update.
2929         * gnulib/import/m4/fstatat.m4: Update.
2930         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2931         * gnulib/import/m4/getcwd-path-max.m4: Update.
2932         * gnulib/import/m4/getcwd.m4: Update.
2933         * gnulib/import/m4/getdtablesize.m4: Update.
2934         * gnulib/import/m4/getlogin.m4: Update.
2935         * gnulib/import/m4/getlogin_r.m4: Update.
2936         * gnulib/import/m4/getpagesize.m4: Update.
2937         * gnulib/import/m4/getprogname.m4: Update.
2938         * gnulib/import/m4/gettimeofday.m4: Update.
2939         * gnulib/import/m4/glibc21.m4: Update.
2940         * gnulib/import/m4/glob.m4: Update.
2941         * gnulib/import/m4/glob_h.m4: Update.
2942         * gnulib/import/m4/gnulib-cache.m4: Update.
2943         * gnulib/import/m4/gnulib-common.m4: Update.
2944         * gnulib/import/m4/gnulib-comp.m4: Update.
2945         * gnulib/import/m4/gnulib-tool.m4: Update.
2946         * gnulib/import/m4/hard-locale.m4: Update.
2947         * gnulib/import/m4/include_next.m4: Update.
2948         * gnulib/import/m4/inttypes-pri.m4: Update.
2949         * gnulib/import/m4/inttypes.m4: Update.
2950         * gnulib/import/m4/isnand.m4: Update.
2951         * gnulib/import/m4/isnanl.m4: Update.
2952         * gnulib/import/m4/largefile.m4: Update.
2953         * gnulib/import/m4/limits-h.m4: Update.
2954         * gnulib/import/m4/localcharset.m4: Update.
2955         * gnulib/import/m4/locale-fr.m4: Update.
2956         * gnulib/import/m4/locale-ja.m4: Update.
2957         * gnulib/import/m4/locale-zh.m4: Update.
2958         * gnulib/import/m4/localtime-buffer.m4: Update.
2959         * gnulib/import/m4/longlong.m4: Update.
2960         * gnulib/import/m4/lstat.m4: Update.
2961         * gnulib/import/m4/malloc.m4: Update.
2962         * gnulib/import/m4/malloca.m4: Update.
2963         * gnulib/import/m4/math_h.m4: Update.
2964         * gnulib/import/m4/mbrtowc.m4: Update.
2965         * gnulib/import/m4/mbsinit.m4: Update.
2966         * gnulib/import/m4/mbsrtowcs.m4: Update.
2967         * gnulib/import/m4/mbstate_t.m4: Update.
2968         * gnulib/import/m4/memchr.m4: Update.
2969         * gnulib/import/m4/memmem.m4: Update.
2970         * gnulib/import/m4/mempcpy.m4: Update.
2971         * gnulib/import/m4/memrchr.m4: Update.
2972         * gnulib/import/m4/mkdir.m4: Update.
2973         * gnulib/import/m4/mkstemp.m4: Update.
2974         * gnulib/import/m4/mmap-anon.m4: Update.
2975         * gnulib/import/m4/mode_t.m4: Update.
2976         * gnulib/import/m4/msvc-inval.m4: Update.
2977         * gnulib/import/m4/msvc-nothrow.m4: Update.
2978         * gnulib/import/m4/multiarch.m4: Update.
2979         * gnulib/import/m4/nocrash.m4: Update.
2980         * gnulib/import/m4/off_t.m4: Update.
2981         * gnulib/import/m4/onceonly.m4: Update.
2982         * gnulib/import/m4/open-cloexec.m4: Update.
2983         * gnulib/import/m4/open.m4: Update.
2984         * gnulib/import/m4/openat.m4: Update.
2985         * gnulib/import/m4/opendir.m4: Update.
2986         * gnulib/import/m4/pathmax.m4: Update.
2987         * gnulib/import/m4/rawmemchr.m4: Update.
2988         * gnulib/import/m4/readdir.m4: Update.
2989         * gnulib/import/m4/readlink.m4: Update.
2990         * gnulib/import/m4/realloc.m4: Update.
2991         * gnulib/import/m4/rename.m4: Update.
2992         * gnulib/import/m4/rewinddir.m4: Update.
2993         * gnulib/import/m4/rmdir.m4: Update.
2994         * gnulib/import/m4/save-cwd.m4: Update.
2995         * gnulib/import/m4/secure_getenv.m4: Update.
2996         * gnulib/import/m4/setenv.m4: Update.
2997         * gnulib/import/m4/signal_h.m4: Update.
2998         * gnulib/import/m4/ssize_t.m4: Update.
2999         * gnulib/import/m4/stat-time.m4: Update.
3000         * gnulib/import/m4/stat.m4: Update.
3001         * gnulib/import/m4/std-gnu11.m4: Update.
3002         * gnulib/import/m4/stdbool.m4: Update.
3003         * gnulib/import/m4/stddef_h.m4: Update.
3004         * gnulib/import/m4/stdint.m4: Update.
3005         * gnulib/import/m4/stdio_h.m4: Update.
3006         * gnulib/import/m4/stdlib_h.m4: Update.
3007         * gnulib/import/m4/strchrnul.m4: Update.
3008         * gnulib/import/m4/strdup.m4: Update.
3009         * gnulib/import/m4/strerror.m4: Update.
3010         * gnulib/import/m4/string_h.m4: Update.
3011         * gnulib/import/m4/strstr.m4: Update.
3012         * gnulib/import/m4/strtok_r.m4: Update.
3013         * gnulib/import/m4/sys_socket_h.m4: Update.
3014         * gnulib/import/m4/sys_stat_h.m4: Update.
3015         * gnulib/import/m4/sys_time_h.m4: Update.
3016         * gnulib/import/m4/sys_types_h.m4: Update.
3017         * gnulib/import/m4/tempname.m4: Update.
3018         * gnulib/import/m4/time_h.m4: Update.
3019         * gnulib/import/m4/unistd-safer.m4: Update.
3020         * gnulib/import/m4/unistd_h.m4: Update.
3021         * gnulib/import/m4/warn-on-use.m4: Update.
3022         * gnulib/import/m4/wchar_h.m4: Update.
3023         * gnulib/import/m4/wchar_t.m4: Update.
3024         * gnulib/import/m4/wctype_h.m4: Update.
3025         * gnulib/import/m4/wint_t.m4: Update.
3026         * gnulib/import/malloc.c: Update.
3027         * gnulib/import/malloc/scratch_buffer.h: Update.
3028         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3029         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3030         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3031         * gnulib/import/malloca.c: Update.
3032         * gnulib/import/malloca.h: Update.
3033         * gnulib/import/malloca.valgrind: Update.
3034         * gnulib/import/math.in.h: Update.
3035         * gnulib/import/mbrtowc.c: Update.
3036         * gnulib/import/mbsinit.c: Update.
3037         * gnulib/import/mbsrtowcs-impl.h: Update.
3038         * gnulib/import/mbsrtowcs-state.c: Update.
3039         * gnulib/import/mbsrtowcs.c: Update.
3040         * gnulib/import/memchr.c: Update.
3041         * gnulib/import/memmem.c: Update.
3042         * gnulib/import/mempcpy.c: Update.
3043         * gnulib/import/memrchr.c: Update.
3044         * gnulib/import/mkdir.c: Update.
3045         * gnulib/import/mkstemp.c: Update.
3046         * gnulib/import/msvc-inval.c: Update.
3047         * gnulib/import/msvc-inval.h: Update.
3048         * gnulib/import/msvc-nothrow.c: Update.
3049         * gnulib/import/msvc-nothrow.h: Update.
3050         * gnulib/import/open.c: Update.
3051         * gnulib/import/openat-die.c: Update.
3052         * gnulib/import/openat-priv.h: Update.
3053         * gnulib/import/openat-proc.c: Update.
3054         * gnulib/import/openat.c: Update.
3055         * gnulib/import/openat.h: Update.
3056         * gnulib/import/opendir.c: Update.
3057         * gnulib/import/pathmax.h: Update.
3058         * gnulib/import/pipe-safer.c: Update.
3059         * gnulib/import/rawmemchr.c: Update.
3060         * gnulib/import/readdir.c: Update.
3061         * gnulib/import/readlink.c: Update.
3062         * gnulib/import/realloc.c: Update.
3063         * gnulib/import/ref-add.sin: Update.
3064         * gnulib/import/ref-del.sin: Update.
3065         * gnulib/import/rename.c: Update.
3066         * gnulib/import/rewinddir.c: Update.
3067         * gnulib/import/rmdir.c: Update.
3068         * gnulib/import/same-inode.h: Update.
3069         * gnulib/import/save-cwd.c: Update.
3070         * gnulib/import/save-cwd.h: Update.
3071         * gnulib/import/scratch_buffer.h: Update.
3072         * gnulib/import/secure_getenv.c: Update.
3073         * gnulib/import/setenv.c: Update.
3074         * gnulib/import/signal.in.h: Update.
3075         * gnulib/import/stat-time.c: Update.
3076         * gnulib/import/stat-time.h: Update.
3077         * gnulib/import/stat-w32.c: Update.
3078         * gnulib/import/stat-w32.h: Update.
3079         * gnulib/import/stat.c: Update.
3080         * gnulib/import/stdbool.in.h: Update.
3081         * gnulib/import/stddef.in.h: Update.
3082         * gnulib/import/stdint.in.h: Update.
3083         * gnulib/import/stdio.in.h: Update.
3084         * gnulib/import/stdlib.in.h: Update.
3085         * gnulib/import/str-two-way.h: Update.
3086         * gnulib/import/strchrnul.c: Update.
3087         * gnulib/import/strdup.c: Update.
3088         * gnulib/import/streq.h: Update.
3089         * gnulib/import/strerror-override.c: Update.
3090         * gnulib/import/strerror-override.h: Update.
3091         * gnulib/import/strerror.c: Update.
3092         * gnulib/import/string.in.h: Update.
3093         * gnulib/import/stripslash.c: Update.
3094         * gnulib/import/strnlen1.c: Update.
3095         * gnulib/import/strnlen1.h: Update.
3096         * gnulib/import/strstr.c: Update.
3097         * gnulib/import/strtok_r.c: Update.
3098         * gnulib/import/sys_stat.in.h: Update.
3099         * gnulib/import/sys_time.in.h: Update.
3100         * gnulib/import/sys_types.in.h: Update.
3101         * gnulib/import/tempname.c: Update.
3102         * gnulib/import/tempname.h: Update.
3103         * gnulib/import/time.in.h: Update.
3104         * gnulib/import/unistd--.h: Update.
3105         * gnulib/import/unistd-safer.h: Update.
3106         * gnulib/import/unistd.in.h: Update.
3107         * gnulib/import/unsetenv.c: Update.
3108         * gnulib/import/verify.h: Update.
3109         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3110         * gnulib/import/wchar.in.h: Update.
3111         * gnulib/import/wctype.in.h: Update.
3112         * gnulib/import/xalloc-oversized.h: Update.
3113         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3114         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3115
3116 2018-08-16  Gary Benson <gbenson@redhat.com>
3117
3118         PR gdb/13000:
3119         * gdb/main.c (captured_main_1): Exit with nonzero status
3120         in batch mode if the last command to be executed failed.
3121         * NEWS: Mention the above.
3122
3123 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3124
3125         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3126         end of warning message.
3127
3128 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3129
3130         PR gdb/22943:
3131         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3132         (aarch64_extract_return_value): Use
3133         aapcs_is_vfp_call_or_return_candidate.
3134         (aarch64_return_in_memory): Likewise.
3135         (aarch64_store_return_value): Likewise.
3136
3137 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3138
3139         * aarch64-tdep.c
3140         (aapcs_is_vfp_call_or_return_candidate): Make static
3141         (pass_in_v_or_stack): Remove function.
3142         (pass_in_v_vfp_candidate): New function.
3143         (aarch64_push_dummy_call): Check for float register candidates.
3144
3145 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3146
3147         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3148         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3149         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3150
3151 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3152
3153         PR build/23399
3154         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3155         (struct ipa_sym_addresses): Rename to...
3156         (struct ipa_sym_addresses_common): ... this.
3157         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3158
3159 2018-08-28  Tom Tromey  <tom@tromey.com>
3160
3161         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3162         (token_fifo): Now a std::vector.
3163         (yylex, c_parse): Update.
3164         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3165         (token_fifo): Now a std::vector.
3166         (yylex, d_parse): Update.
3167         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3168         (token_fifo): Now a std::vector.
3169         (yylex, go_parse): Update.
3170
3171 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3172
3173         * parser-defs.h (struct type_stack) <elements>: Change type to
3174         std::vector<union type_stack_elt>.
3175         <depth, size>: Remove.
3176         * parse.c (parse_exp_in_context_1): Adjust.
3177         (type_stack_reserve): Remove.
3178         (check_type_stack_depth): Remove.
3179         (insert_into_type_stack): Adjust to std::vector.
3180         (insert_type): Likewise.
3181         (push_type): Likewise.
3182         (push_type_int): Likewise.
3183         (insert_type_address_space): Likewise.
3184         (pop_type): Likewise.
3185         (pop_type_int): Likewise.
3186         (pop_typelist): Likewise.
3187         (pop_type_stack): Likewise.
3188         (append_type_stack): Likewise.
3189         (push_type_stack): Likewise.
3190         (get_type_stack): Likewise.
3191         (type_stack_cleanup): Likewise.
3192         (push_typelist): Likewise.
3193         (follow_types): Likewise.
3194         (_initialize_parse): Likewise.
3195
3196 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3197
3198         * NEWS: Mention csky target.
3199
3200 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3201             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3202             Don Breazeal  <donb@codesourcery.com>
3203
3204         * csky-linux-tdep.c: New file.
3205         * csky-tdep.c: Likewise.
3206         * csky-tdep.h: Likewise.
3207         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3208         csky-tdep.o.
3209         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3210         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3211         * configure.tgt: Add csky support.
3212
3213 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3214
3215         * python/py-framefilter.c (py_print_frame): Print frame architecture
3216         when printing on an MI output.
3217
3218 2018-08-27  Tom Tromey  <tom@tromey.com>
3219
3220         PR build/23087:
3221         * configure: Rebuild.
3222         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3223
3224 2018-08-27  Tom Tromey  <tom@tromey.com>
3225
3226         * aarch64-linux-tdep.c
3227         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3228         casts to int.
3229
3230 2018-08-27  Tom Tromey  <tom@tromey.com>
3231
3232         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3233         unsigned.
3234         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3235         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3236         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3237         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3238         unsigned.
3239
3240 2018-08-27  Tom Tromey  <tom@tromey.com>
3241
3242         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3243         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3244
3245 2018-08-27  Tom Tromey  <tom@tromey.com>
3246
3247         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3248         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3249         ULONGEST_MAX.
3250         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3251         ULONGEST_MAX.
3252         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3253         ULONGEST_MAX.
3254         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3255         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3256         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3257         ULONGEST_MAX.
3258         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3259         (ppc64_linux_sigaction_tramp_frame)
3260         (ppc32_linux_sighandler_tramp_frame)
3261         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3262         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3263         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3264         * mn10300-linux-tdep.c (am33_linux_sigframe)
3265         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3266         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3267         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3268         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3269         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3270         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3271         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3272         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3273         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3274         * microblaze-linux-tdep.c
3275         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3276         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3277         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3278         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3279         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3280         * common/common-types.h (ULONGEST_MAX): New define.
3281         (CORE_ADDR_MAX): Fix formatting.
3282         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3283         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3284         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3285         (arm_linux_rt_sigreturn_tramp_frame)
3286         (arm_eabi_linux_sigreturn_tramp_frame)
3287         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3288         (thumb2_eabi_linux_sigreturn_tramp_frame)
3289         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3290         (arm_linux_restart_syscall_tramp_frame)
3291         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3292         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3293         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3294         ULONGEST_MAX.
3295         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3296
3297 2018-08-27  Tom Tromey  <tom@tromey.com>
3298
3299         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3300         CORE_ADDR_MAX.
3301         * mips-tdep.c (mips_deal_with_atomic_sequence)
3302         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3303         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3304         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3305         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3306         CORE_ADDR_MAX.
3307         * aarch64-tdep.c (aarch64_software_single_step): Use
3308         CORE_ADDR_MAX.
3309
3310 2018-08-27  Tom Tromey  <tom@tromey.com>
3311
3312         * linespec.c (complete_linespec_component): Add cast to "char".
3313         * completer.c (completion_tracker::build_completion_result): Add
3314         cast to "char".
3315
3316 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3317
3318         * solist.h (struct solist, struct target_so_ops): Fix
3319         indentation.
3320
3321 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3322
3323         * ada-tasks.c (ada_task_info_s): Remove typedef.
3324         (DEF_VEC_O(ada_task_info_s)): Remove.
3325         (struct ada_tasks_inferior_data): Initialize fields.
3326         <task_list>: Make an std::vector.
3327         (get_ada_tasks_inferior_data): Allocate with new.
3328         (ada_get_task_number): Adjust.
3329         (get_task_number_from_id): Likewise.
3330         (valid_task_id): Likewise.
3331         (ada_get_task_info_from_ptid): Likewise.
3332         (iterate_over_live_ada_tasks): Likewise.
3333         (add_ada_task): Likewise.
3334         (read_known_tasks): Likewise.
3335         (ada_build_task_list): Likewise.
3336         (print_ada_task_info): Likewise.
3337         (info_task): Likewise.
3338         (task_command_1): Likewise.
3339
3340 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3341
3342         * ada-lang.c (add_angle_brackets): Return std::string.
3343
3344 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3345
3346         * python/py-threadevent.c (py_get_event_thread): Initialize
3347         pythread.
3348
3349 2018-08-24  Pedro Alves  <palves@redhat.com>
3350
3351         * python/py-bpevent.c (create_breakpoint_event_object): Use
3352         copy-initialization.
3353         * python/py-continueevent.c (emit_continue_event): Use
3354         copy-initialization.
3355         * python/py-exitedevent.c (create_exited_event_object): Return a
3356         gdbpy_ref<>.
3357         (emit_exited_event): Use copy-initialization.
3358         * python/py-inferior.c (python_new_inferior)
3359         (python_inferior_deleted, add_thread_object): Use
3360         copy-initialization.
3361         * python/py-infevents.c (create_inferior_call_event_object)
3362         (create_register_changed_event_object)
3363         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3364         (emit_inferior_call_event, emit_memory_changed_event)
3365         (emit_register_changed_event): Use copy-initialization.
3366         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3367         Return a gdbpy_ref<>.
3368         (emit_new_objfile_event): Use copy-initialization.
3369         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3370         (emit_clear_objfiles_event): Use copy-initialization.
3371         * python/py-signalevent.c (create_signal_event_object): Use
3372         copy-initialization.
3373         * python/py-threadevent.c (create_thread_event_object): Use
3374         copy-initialization.
3375
3376 2018-08-24  Pedro Alves  <palves@redhat.com>
3377             Simon Marchi  <simon.marchi@ericsson.com>
3378
3379         PR gdb/23379
3380         * python/py-continueevent.c: Include "gdbthread.h".
3381         (create_continue_event_object): Add intro comment.  Add 'ptid'
3382         parameter.  Use it to find thread to pass to
3383         create_thread_event_object.
3384         (emit_continue_event): Pass PTID down to
3385         create_continue_event_object.
3386         * python/py-event.h (py_get_event_thread): Declare.
3387         (create_thread_event_object): Remove default from 'thread'
3388         parameter.
3389         * python/py-stopevent.c (create_stop_event_object): Use
3390         py_get_event_thread.
3391         * python/py-threadevent.c (get_event_thread): Rename to ...
3392         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3393         and use it to find the thread.
3394         (create_thread_event_object): Assert that THREAD isn't null.
3395         Don't find the event thread here.
3396
3397 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3398
3399         * block.h (blockrange, blockranges): New struct declarations.
3400         (struct block): Add new field named `ranges'.
3401         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3402         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3403         macros for accessing ranges in struct block.
3404         (make_blockranges): New declaration.
3405         block.c (make_blockranges): New function.
3406         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3407         for block.
3408         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3409         * blockframe.c (cache_pc_function_block): New static global.
3410         (clear_pc_function_cache): Clear cache_pc_function_block.
3411         (find_pc_partial_function): Move comment to symtab.h.  Add
3412         support for non-contiguous blocks.
3413         * cli/cli-cmds.c (block.h): Include.
3414         (print_disassembly): Handle printing of non-contiguous blocks.
3415         (disassemble_current_function): Likewise.
3416         (disassemble_command): Likewise.
3417
3418         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3419         BLOCK_START.
3420         * blockframe.c (get_pc_function_start): Likewise.
3421         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3422         (gcc_symbol_address): Likewise.
3423         * compile/compile-object-run.c (compile_object_run): Likewise.
3424         * compile/compile.c (get_expr_block_and_pc): Likewise.
3425         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3426         (func_addr_to_tail_call_list): Likewise.
3427         * findvar.c (default_read_var_value): Likewise.
3428         * inline-frame.c (inline_frame_this_id): Likewise.
3429         (skip-inline_frames): Likewise.
3430         * infcmd.c (until_next_command): Likewise.
3431         * linespec.c (convert_linespec_to_sals): Likewise.
3432         * parse.c (parse_exp_in_context_1): Likewise.
3433         * printcmd.c (build_address_symbolic): likewise.
3434         (info_address_command): Likewise.
3435         symtab.c (find_function_start_sal): Likewise.
3436         (skip_prologue_sal): Likewise.
3437         (find_function_alias_target): Likewise.
3438         (find_gnu_ifunc): Likewise.
3439         * stack.c (find_frame_funname): Likewise.
3440         * symtab.c (fixup_symbol_section): Likewise.
3441         (find_function_start_sal): Likewise.
3442         (skip_prologue_sal): Likewsie.
3443         (find_function_alias_target): Likewise.
3444         (find_gnu_ifunc): Likewise.
3445         * tracepoint.c (info_scope_command): Likewise.
3446         * value.c (value_fn_field): Likewise.
3447
3448         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3449         in place of find_pc_partial_function.
3450         * blockframe.c (find_function_entry_range_from_pc): New function.
3451         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3452         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3453         for each range in a block.
3454
3455
3456 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3457
3458         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3459         incrementation.
3460
3461 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3462
3463         * solib-svr4.c (read_program_headers_from_bfd): Return
3464         gdb::optional<gdb::byte_vector>.
3465         (svr4_exec_displacement): Adjust.
3466
3467 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3468
3469         * solib-svr4.c (read_program_header): Return
3470         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3471         (find_program_interpreter): Return
3472         gdb::optional<gdb::byte_vector>.
3473         (scan_dyntag_auxv): Adjust.
3474         (enable_break): Adjust.
3475         (svr4_exec_displacement): Adjust.
3476
3477 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3478
3479         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3480         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3481
3482 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3483
3484         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3485         string_vprintf.
3486         * guile/scm-utils.c (gdbscm_printf): Likewise.
3487         * serial.c (serial_printf): Likewise.
3488         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3489
3490 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3491
3492         * stack.c (print_frame): Print frame architecture when printing on
3493         an MI output.
3494         * NEWS: Mention new "arch" attribute in frame output.
3495
3496 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3497
3498         * arch/aarch64.h (aarch64_regnum): Update comment.
3499
3500 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3501
3502         * NEWS: Add SVE to 8.2 section.
3503
3504 2018-08-21  Pedro Alves  <palves@redhat.com>
3505
3506         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3507         out from gdbscm_parse_function_args.
3508         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3509         gdbscm_parse_function_args_1.
3510
3511 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3512
3513         PR gdb/17816
3514         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3515         operator.
3516
3517 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3518
3519         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3520
3521 2018-08-19  Michael Spang  <spang@google.com>
3522
3523         PR gdb/11786
3524         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3525         for PT_TLS segments.
3526
3527 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3528
3529         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3530         dwarf_variable_value.
3531         * dwarf2-frame.c (class dwarf_expr_executor):
3532         Add override for dwarf_variable_value.
3533         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3534         (class symbol_needs_eval_context): Likewise.
3535         (indirect_synthetic_pointer): Add forward declaration.
3536         (sect_variable_value): New function.
3537         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3538         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3539         for DW_OP_GNU_variable_value.
3540
3541 2018-08-16  Tom Tromey  <tom@tromey.com>
3542
3543         * top.c (read_command_file): Update.
3544         (command_line_input): Remove "repeat" argument.
3545         * ada-lang.c (get_selections): Update.
3546         * linespec.c (decode_line_2): Update.
3547         * defs.h (command_line_input): Remove argument.
3548         * cli/cli-script.c (read_next_line): Update.
3549         * python/py-gdb-readline.c: Update.
3550
3551 2018-08-17  Tom Tromey  <tom@tromey.com>
3552
3553         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3554         command_line_input.
3555
3556 2018-08-15  Tom Tromey  <tom@tromey.com>
3557
3558         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3559
3560 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3561
3562         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3563         If used, use find_pc_partial_function to find address range
3564         to disassemble.
3565         * mi/mi-main.c (mi_cmd_list_features): Report
3566         "data-disassemble-a-option" feature.
3567         * NEWS: Mention new -data-disassemble option -a.
3568
3569 2018-08-13  Tom Tromey  <tom@tromey.com>
3570
3571         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3572
3573 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3574
3575         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3576         (aarch64_linux_collect_sve_regset): Likewise.
3577         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3578         * regcache.h (regcache_map_entry_size): New function.
3579
3580 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3581
3582         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3583         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3584         (SVE_HEADER_VL_LENGTH): Likewise.
3585         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3586         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3587         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3588         (SVE_HEADER_SIZE_OFFSET): Likewise.
3589         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3590         (SVE_HEADER_VL_OFFSET): Likewise.
3591         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3592         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3593         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3594         (SVE_HEADER_SIZE): Likewise.
3595         (aarch64_linux_core_read_vq): Add function.
3596         (aarch64_linux_core_read_description): Check for SVE section.
3597
3598 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3599
3600         * aarch64-fbsd-tdep.c
3601         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3602         collect_size.
3603         * aarch64-linux-tdep.c
3604         (aarch64_linux_iterate_over_regset_sections): Likewise.
3605         * alpha-linux-tdep.c
3606         (alpha_linux_iterate_over_regset_sections):
3607         * alpha-nbsd-tdep.c
3608         (alphanbsd_iterate_over_regset_sections): Likewise.
3609         * amd64-fbsd-tdep.c
3610         (amd64fbsd_iterate_over_regset_sections): Likewise.
3611         * amd64-linux-tdep.c
3612         (amd64_linux_iterate_over_regset_sections): Likewise.
3613         * arm-bsd-tdep.c
3614         (armbsd_iterate_over_regset_sections): Likewise.
3615         * arm-fbsd-tdep.c
3616         (arm_fbsd_iterate_over_regset_sections): Likewise.
3617         * arm-linux-tdep.c
3618         (arm_linux_iterate_over_regset_sections): Likewise.
3619         * corelow.c (get_core_registers_cb): Likewise.
3620         (core_target::fetch_registers): Likewise.
3621         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3622         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3623         * gdbarch.h (void): Regenerate.
3624         * gdbarch.sh: Add supply_size and collect_size.
3625         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3626         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3627         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3628         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3629         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3630         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3631         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3632         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3633         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3634         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3635         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3636         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3637         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3638         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3639         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3640         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3641         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3642         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3643         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3644         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3645         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3646         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3647         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3648         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3649         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3650         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3651         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3652         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3653         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3654         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3655
3656 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3657
3658         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3659         with string_printf.
3660
3661 2018-08-10  Keith Seitz  <keiths@redhat.com>
3662
3663         * compile/compile-c-support.c (add_code_header, add_code_footer):
3664         Move into policy class.
3665         (c_push_user_expression, pop_user_expression_nop)
3666         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3667         (compile_program): New host class.
3668         (c_compile_program): New typedef.
3669         (c_compute_porgram): Use c_compile_program.
3670
3671 2018-08-10  Keith Seitz  <keiths@redhat.com>
3672
3673         * compile/compile-internal.h (compile_instance::~compile_instance):
3674         Remove calls to htab_delete.
3675         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3676         * compile.c (compile_instance::compile_instance): Initialize
3677         htab unique pointers.
3678         (compile_instance::get_cached_type, compile_instance::insert_type)
3679         (compile_instance::error_symbol_once): Update for unique_ptr.
3680
3681 2018-08-10  Keith Seitz  <keiths@redhat.com>
3682
3683         * compile/compile-c-symbols.c (struct symbol_error)
3684         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3685         (compile_instance::insert_symbol_error)
3686         (compile_instance::error_symbol_once): Move to ...
3687         * compile/compile.c: ... here.
3688
3689 2018-08-10  Keith Seitz  <keiths@redhat.com>
3690
3691         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3692         instead of `new_compile_instance'.
3693         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3694         Update description.
3695         If the symbol error map is not initialized, create it.
3696         (generate_c_for_for_one_symbol): Do not check/initialize
3697         the symbol error map.
3698         * compile/compile-c-types.c (compile_c_instance): Make a class.
3699         Update all callers.
3700         (compile_instance::compile_instance): Initialize the type cache.
3701         (get_cached_type): New function.
3702         (insert_type): Update description.
3703         (compile_c_instance::m_default_cflags): Define.
3704         (convert_type): Update description.  Use get_cached_type.
3705         (delete_instance): Moved to destructor.
3706         (new_compile_instance): Moved to constructor.
3707         * compile/compile-c.h (compile_c_instance): Make class inheriting
3708         from compile_instance.
3709         <base>: Remove field.
3710         <type_map, symbol_err_map>: Move to base class.
3711         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3712         * compile/compile-internal.h (compile_instance): Make class.
3713         <type_map_t, symbol_err_map_t>: Define.
3714         <fe>: Rename to `m_gcc_fe'.
3715         <scope, block, gcc_target_options>: Add `m_' prefix.
3716         <m_type_map, m_symbol_err_map>: New fields, moved from
3717         compile_c_instance.
3718         <destroy>: Remove.
3719         (convert_type, new_compile_instance): Remove.
3720         * compile/compile.c (cleanup_compile_instance): Remove.
3721         (compile_to_object): Use unique_ptr to eliminate cleanups.
3722         (compile_instance::set_print_callback, compile_instance::version)
3723         (compile_instance::set_verbose)
3724         (compile_instance::set_driver_filename)
3725         (compile_instance::set_triplet_regexp)
3726         (compile_instance::set_arguments)
3727         (compile_instance::set_source_file)
3728         (compile_instance::compile): Define.
3729
3730 2018-08-10  Keith Seitz  <keiths@redhat.com>
3731
3732         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3733         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3734         gcc-c-fe.def to define C plugin.
3735         (delete_instance): Delete `c_plugin'.
3736         (new_compile_instance): Initialize `c_plugin'.
3737         * compile/compile-c.h: Include gcc_c_plugin.h.
3738         (struct compile_c_instance) <c_plugin>: New member.
3739         * gcc-c-plugin.h: New file.
3740         Update all callers with API change.
3741
3742 2018-08-10  Keith Seitz  <keiths@redhat.com>
3743
3744         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3745         (HFILES_NO_SRCDIR): ... to here.
3746         Add compile-internal.h and compile-c.h.
3747         * compile/compile-c-support.c: Include compile-c.h.
3748         * compile/compile-c-symbols.c: Include compile-c.h.
3749         (generate_c_for_variable_locations): Update comment.
3750         * compile/compile-c-types.c: Include compile-c.h.
3751         * compile/compile-c.h: New file -- moved C language declarations
3752         from other files here.
3753         * compile/compile-internal.h: Do not include hashtab.h or
3754         common/enum-flags.h.
3755         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3756         (gcc_convert_symbol, gcc_symbol_address)
3757         (generate_c_for_variable_locations, c_get_mode_for_size)
3758         (c_get_range_decl_name): Definitions moved to compile-c.h.
3759         * compile/compile-loc2c.c: Include compile-c.h.
3760
3761 2018-08-10  Keith Seitz  <keiths@redhat.com>
3762
3763         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3764         (c_symbol_substitution_name): ... this.
3765         Update all callers.
3766
3767 2018-08-10  Keith Seitz  <keiths@redhat.com>
3768
3769         * compile/compile-c-support.c (c_compute_program): Use
3770         unique_xmalloc_ptr to eliminate cleanup.
3771         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3772         Return a unique_xmalloc_ptr and eliminate cleanup.
3773         * compile/compile-internal.h (generate_c_for_variable_locations):
3774         Return unique_xmalloc_ptr and update description.
3775
3776 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3777
3778         * corelow.c (core_target::get_core_register_section): Rename
3779         min_size to section_min_size.
3780
3781 2018-08-09  Jim Wilson  <jimw@sifive.com>
3782
3783         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3784         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3785         * NEWS: Mention new GNU/Linux RISC-V target.
3786         * configure.host: Add riscv*-*-linux*.
3787         * configure.nat: Add riscv*.
3788         * configure.tgt: Add riscv*-*-linux*.
3789         * riscv-linux-nat.c: New file.
3790         * riscv-linux-tdep.c: New file.
3791
3792 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3793
3794         * infrun.c (resume): Make static, add forward declaration.
3795         (proceed): Update header comment.
3796         * infrun.h (resume): Delete declaration.
3797
3798 2018-08-09  Tom Tromey  <tom@tromey.com>
3799
3800         * riscv-tdep.h: Minor formatting fixes.
3801
3802 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3803
3804         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3805         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3806         (test_mkdir_recursive): Likewise.
3807         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3808
3809 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3810
3811         * valarith.c (value_subscripted_rvalue): If an array is not in
3812         memory, and we don't know the upper bound, then we can't know that
3813         the requested element exists or not.
3814
3815 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3816
3817         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3818         (target_options_to_string): Add comment.
3819
3820 2018-08-08  Tom Tromey  <tom@tromey.com>
3821
3822         * unittests/scoped_mmap-selftests.c: Check result of "write".
3823
3824 2018-08-08  Jim Wilson  <jimw@sifive.com>
3825
3826         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3827         (decode_register_index_short): New.
3828         (decode_j_type_insn, decode_cj_type_insn): New.
3829         (decode_b_type_insn, decode_cb_type_insn): New.
3830         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3831         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3832         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3833         is_c_sw_insn instead of is_sw_insn.
3834         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3835         (riscv_software_single_step): New.
3836         * riscv-tdep.h (riscv_software_single_step): Declare.
3837
3838         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3839         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3840
3841 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3842
3843         PR gdb/18050:
3844         * target.c (dispose_inferior): Don't dispose of inferiors that are
3845         already killed.
3846
3847 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3848
3849         * remote.c (remote_target::download_tracepoint): Change char* to
3850         const char*.
3851
3852 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3853
3854         * target.h (target_options_to_string): Return an std::string.
3855         * target.c (str_comma_list_concat_elem): Return void, use
3856         std::string.
3857         (do_option): Likewise.
3858         (target_options_to_string): Return an std::string.
3859         * linux-nat.c (linux_nat_target::wait): Adjust.
3860         * target-debug.h (target_debug_print_options): Adjust.
3861
3862 2018-08-07  Tom Tromey  <tom@tromey.com>
3863
3864         * Makefile.in (CPPFLAGS): New variable.
3865         (INTERNAL_CPPFLAGS): Use it.
3866
3867 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3868
3869         * NEWS: Mention the index cache.
3870
3871 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3872
3873         * common/pathstuff.h (get_standard_cache_dir): New.
3874         * common/pathstuff.c (get_standard_cache_dir): New.
3875         * build-id.h (build_id_to_string): New.
3876         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3877         DEBUG_STR_SUFFIX): Move to here.
3878         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3879         DEBUG_STR_SUFFIX): Move from there.
3880         (write_psymtabs_to_index): Make non-static, add basename
3881         parameter.  Write to temporary files, rename when done.
3882         (save_gdb_index_command): Adjust call to
3883         write_psymtabs_to_index.
3884         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3885         field.
3886         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3887         (get_gdb_index_contents_from_cache): New.
3888         (get_gdb_index_contents_from_cache_dwz): New.
3889         (dwarf2_initialize_objfile): Read index from cache.
3890         (dwarf2_build_psymtabs): Save to index.
3891         * dwarf-index-cache.h: New file.
3892         * dwarf-index-cache.c: New file.
3893         * dwarf-index-write.h: New file.
3894
3895 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3896
3897         * gnulib/aclocal.m4: Re-generate.
3898         * gnulib/config.in: Re-generate.
3899         * gnulib/configure: Re-generate.
3900         * gnulib/import/Makefile.am: Re-generate.
3901         * gnulib/import/Makefile.in: Re-generate.
3902         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3903         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3904         * gnulib/import/m4/mkdir.m4: New file.
3905         * gnulib/import/mkdir.c: New file.
3906         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3907         module.
3908
3909 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3910
3911         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3912         * common/scoped_mmap.c: New file.
3913         * common/scoped_mmap.h (destroy): New method.
3914         (~scoped_mmap, reset): Use destroy.
3915         (scoped_mmap): New move constructor.
3916         (mmap_file): New declaration.
3917         * unittests/scoped_mmap-selftests.c (test_normal,
3918         test_invalid_filename, run_tests): New functions.
3919         (_initialize_scoped_mmap_selftests): Register selftest.
3920
3921 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3922
3923         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3924         (read_gdb_index_from_buffer): ... this.  Remove section
3925         parameter, add buffer parameter.
3926         (get_gdb_index_contents_ftype,
3927         get_gdb_index_contents_dwz_ftype): New typedefs.
3928         (dwarf2_read_gdb_index): Add callback parameters to get the
3929         index contents.
3930         (get_gdb_index_contents_from_section): New.
3931         (dwarf2_initialize_objfile): Update call to
3932         dwarf2_read_gdb_index.
3933
3934 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3935
3936         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3937         (gdb_open_cloexec): Likewise.
3938         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3939         (commandline_from_pid): Likewise.
3940         (linux_xfer_osdata_threads): Likewise.
3941         (linux_xfer_osdata_fds): Likewise.
3942         * ada-lang.c (is_package_name): Likewise.
3943         * auxv.c (procfs_xfer_auxv): Likewise.
3944         * breakpoint.c (print_one_breakpoint_location): Use
3945         uiout::field_fmt.
3946         (print_one_catch_solib): Use string_printf.
3947         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3948         (add_pe_forwarded_sym): Likewise.
3949         * dwarf2read.c (create_type_unit_group): Likewise.
3950         (build_error_marker_type): Likewise.
3951         * infcall.c (get_function_name): Likewise.
3952         * valprint.c (print_converted_chars_to_obstack): Likewise.
3953         * xtensa-tdep.c (xtensa_register_type): Likewise.
3954
3955 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3956
3957         * remote.c (remote_target::download_tracepoint): Fix format
3958         string errors.
3959
3960 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3961
3962         * tracefile.c: Include common/byte-vector.h.
3963         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3964         with trace_regblock_size if needed.  Update uses of buf.
3965
3966 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3967
3968         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3969         std::vector<unsigned char>.
3970         * tracepoint.c (collection_list::collection_list): Remove
3971         m_regs_mask initializer from initializer list.  Resize
3972         m_regs_mask using the largest remote register number.
3973         (collection_list::add_remote_register): Remove size check on
3974         m_regs_mask.  Use at to access element.
3975         (collection_list::stringify): Change type of temp_buf to
3976         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3977         stringify the register mask.  Use pack_hex_byte for the register
3978         mask.
3979
3980 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3981
3982         * tracepoint.h (class collection_list) <add_register>: Remove.
3983         <add_remote_register, add_ax_registers, add_local_register>:
3984         Declare.
3985         <add_memrange>: Add scope parameter.
3986         * tracepoint.c (encode_actions_1): Likewise.
3987         (collection_list::add_register): Rename to ...
3988         (collection_list::add_remote_register): ... this.  Update
3989         comment.
3990         (collection_list::add_ax_registers, add_local_register): New
3991         methods.
3992         (collection_list::add_memrange): Add scope parameter.  Call
3993         add_local_register instead of add_register.
3994         (finalize_tracepoint_aexpr): New function.
3995         (collection_list::collect_symbol): Update calls to add_memrange.
3996         Call add_local_register instead of add_register.  Call
3997         add_ax_registers.  Call finalize_tracepoint_aexpr.
3998         (encode_actions_1): Get remote regnos for $reg action.  Call
3999         add_remote_register, add_ax_registers, and add_local_register.
4000         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4001         (validate_actionline): Call finalize_tracepoint_aexpr.
4002
4003 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4004
4005         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4006         Replace array buf with gdb::char_vector buf, of size
4007         get_remote_packet_size ().  Replace references to buf and
4008         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4009         and xsnprintf with snprintf.  Raise errors if the buffer is too
4010         small.
4011
4012 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4013
4014         * remote.c (remote_target::download_tracepoint): Fix the has_more
4015         predicate in the QTDP action list iteration.
4016
4017 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4018
4019         * remote.c (remote_target::download_tracepoint): Fix indentation
4020         in for block.
4021
4022 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4023
4024         * proc-api.c (_initialize_proc_api): Remove c, unused.
4025         * procfs.c (procfs_init_inferior): Remove signals, unused.
4026         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4027         unused.
4028
4029 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4030             Andrew Burgess  <andrew.burgess@embecosm.com>
4031
4032         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4033         'W_STOPCODE (0)' as this could be ambiguous.
4034
4035 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4036
4037         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4038         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4039         "ai_socktype").
4040
4041 2018-08-02  Tom Tromey  <tom@tromey.com>
4042
4043         PR symtab/16842.
4044         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4045         symbols.
4046         (process_structure_scope): Likewise.
4047
4048 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4049
4050         PR gdb/22629:
4051         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4052         kill inferior.
4053
4054 2018-08-02  Tom Tromey  <tom@tromey.com>
4055
4056         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4057         (darwin_suspend_inferior, darwin_resume_inferior)
4058         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4059         (darwin_check_new_threads): Check result of get_darwin_inferior.
4060
4061 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4062
4063         GDB 8.1.1 released.
4064
4065 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4066
4067         * varobj.c (varobj_get_path_expr_parent): Report an error if
4068         parent is a dynamic varobj.
4069
4070 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4071
4072         * gnulib/aclocal.m4: Re-generate.
4073         * gnulib/config.in: Re-generate.
4074         * gnulib/configure: Re-generate.
4075         * gnulib/import/Makefile.in: Re-generate.
4076         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4077         * gnulib/import/m4/onceonly.m4: Re-generate.
4078
4079 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4080
4081         * target-descriptions.c (struct xml_test_tdesc): New.
4082         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4083         (record_xml_tdesc): Update.
4084         (maintenance_check_xml_descriptions): Update.
4085         * target-descriptions.h (record_xml_tdesc): Update comment.
4086
4087 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4088
4089         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4090         checking array bounds are defined.
4091
4092 2018-07-30  Tom Tromey  <tom@tromey.com>
4093
4094         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4095         irreflexivity violation.
4096
4097 2018-07-30  Tom Tromey  <tom@tromey.com>
4098
4099         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4100         * value.c (unpack_long): Remove lint code.
4101         * valops.c (value_ind): Remove lint code.
4102         * valarith.c (value_x_binop, value_x_unop, value_equal)
4103         (value_pos): Remove lint code.
4104
4105 2018-07-28  Tom de Vries  <tdevries@suse.de>
4106
4107         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4108         with undefined upper bound as <optimized out>.
4109
4110 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4111
4112         * gcore.in: Rename variable "name" to "prefix".  Expand
4113         "usage" text.
4114
4115 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4116
4117         * windows-nat.c (windows_nat_target::create_inferior): Update to
4118         call close() in global namespace.
4119
4120 2018-07-26  Tom Tromey  <tom@tromey.com>
4121
4122         * dwarf-index-write.c (add_address_entry): Don't add objfile
4123         offsets.
4124         * dbxread.c (find_stab_function): Rename from
4125         find_stab_function_addr.  Return a bound_minimal_symbol.
4126         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4127         Don't add objfile offsets.
4128         (end_psymtab): Use raw_text_low, raw_text_high,
4129         MSYMBOL_VALUE_RAW_ADDRESS.
4130         (read_ofile_symtab): Update.
4131         (process_one_symbol): Update.
4132         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4133         offsets.
4134         (dw2_relocate): Remove.
4135         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4136         searching addrmap.
4137         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4138         Update.
4139         (process_psymtab_comp_unit_reader, add_partial_symbol)
4140         (add_partial_subprogram, dwarf2_ranges_read): Update.
4141         (load_partial_dies): Update.
4142         (add_address_entry): Don't add objfile offsets.
4143         (dwarf2_build_include_psymtabs): Update.
4144         (create_addrmap_from_aranges): Don't add objfile offsets.
4145         (dw2_find_pc_sect_compunit_symtab): Update.
4146         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4147         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4148         Update.
4149         (parse_partial_symbols): Don't add objfile offsets.  Use
4150         raw_text_low, raw_text_high.  Update.
4151         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4152         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4153         or call 'relocate' quick function.  Clear psymbol_map.
4154         * psympriv.h (struct partial_symbol) <address>: Add section
4155         offset.
4156         <set_unrelocated_address>: Rename from set_address.
4157         <raw_text_low, raw_text_high>: New methods.
4158         <text_low, text_high>: Add objfile parameter.
4159         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4160         set_unrelocated_address.
4161         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4162         (find_pc_psymbol): Update.
4163         (fixup_psymbol_section, relocate_psymtabs): Remove.
4164         (dump_psymtab, psym_functions): Update.
4165         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4166         parameter.
4167         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4168         (start_psymtab_common): Update.
4169         * symfile-debug.c (debug_qf_relocate): Remove.
4170         (debug_sym_quick_functions): Update.
4171         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4172         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4173         Update.
4174
4175 2018-07-26  Tom Tromey  <tromey@redhat.com>
4176
4177         * dbxread.c (end_psymtab): Use text_high_valid and
4178         text_low_valid.
4179         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4180         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4181         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4182         Update comment.
4183         <text_low_valid, text_high_valid>: New fields.
4184         <set_text_low, set_text_high>: Update.
4185         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4186
4187 2018-07-26  Tom Tromey  <tom@tromey.com>
4188
4189         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4190         Update.
4191         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4192         textlow and texthigh fields.
4193         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4194         Update.
4195         * mdebugread.c (parse_lines, parse_partial_symbols)
4196         (psymtab_to_symtab_1): Update.
4197         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4198         Rename fields.  Update comment.  Now private.
4199         <text_low, text_high, set_text_low, set_text_high>: New methods.
4200         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4201         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4202         (start_psymtab_common, maintenance_info_psymtabs)
4203         (maintenance_check_psymtabs): Update.
4204         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4205         texthigh fields.
4206         (scan_xcoff_symtab): Update.
4207
4208 2018-07-26  Tom Tromey  <tromey@redhat.com>
4209
4210         * psympriv.h (struct partial_symbol) <unrelocated_address,
4211         address, set_address>: New methods.
4212         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4213         (fixup_psymbol_section, relocate_psymtabs): Update.
4214         (print_partial_symbols): Add 'objfile' parameter.  Update.
4215         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4216         Update.
4217
4218 2018-07-26  Tom Tromey  <tom@tromey.com>
4219
4220         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4221         (debug_names::write_psymbols): Update.
4222         * psympriv.h (struct partial_symbol): Derive from
4223         general_symbol_info.
4224         <obj_section>: New method.
4225         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4226         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4227         (find_pc_sect_psymbol, fixup_psymbol_section)
4228         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4229         (print_partial_symbols, recursively_search_psymtabs)
4230         (compare_psymbols, psymbol_hash, psymbol_compare)
4231         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4232         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4233
4234 2018-07-26  Tom Tromey  <tromey@redhat.com>
4235
4236         * dbxread.c (end_psymtab): Remove dead code.
4237
4238 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4239
4240         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4241         DWARF unwinders are disabled.
4242         * dwarf2-frame.c: Add dwarf2read.h include.
4243         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4244         disabled.
4245         (dwarf2_frame_unwinders_enabled_p): Define.
4246         (show_dwarf_unwinders_enabled_p): New function.
4247         (_initialize_dwarf2_frame): Register switch to control DWARF
4248         unwinder use.
4249         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4250         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4251         (show_dwarf_cmdlist): Remove static keyword.
4252         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4253         (show_dwarf_cmdlist): Declare.
4254         * NEWS: Document new feature.
4255
4256 2018-07-26  Tom de Vries  <tdevries@suse.de>
4257
4258         PR breakpoints/23366
4259         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4260
4261 2018-07-26  Tom de Vries  <tdevries@suse.de>
4262
4263         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4264         DW_AT_count can't be translated to a dynamic prop.
4265
4266 2018-07-25  Tom de Vries  <tdevries@suse.de>
4267
4268         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4269         try/catch.
4270
4271 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4272
4273         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4274
4275 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4276
4277         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4278
4279 2018-07-24  Keith Seitz  <keiths@redhat.comt
4280
4281         PR symtab/23010
4282         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4283         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4284         instead of add_symbol_to_list.
4285         (read_file_scope): Call prepare_one_comp_unit before reading
4286         any other DIEs.
4287
4288 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4291
4292 2018-07-24  Tom Tromey  <tom@tromey.com>
4293
4294         * utils.c (malloc, realloc, free): Don't declare.
4295         * configure, config.in: Rebuild.
4296         * configure.ac: Don't check for declarations of free, malloc, or
4297         realloc.
4298
4299 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4300
4301         * aarch64-linux-nat.c
4302         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4303         variable.
4304         * arm-linux-nat.c (fetch_regs): Likewise.
4305         (store_regs): Likewise.
4306         (fetch_vfp_regs): Likewise.
4307         (store_vfp_regs): Likewise.
4308         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4309         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4310         (arm_linux_nat_target::insert_watchpoint): Likewise.
4311         (arm_linux_nat_target::remove_watchpoint): Likewise.
4312         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4313         Likewise.
4314         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4315         Likewise.
4316         * ppc-linux-nat.c (fetch_register): Likewise.
4317         (fetch_all_gp_regs): Likewise.
4318         (fetch_ppc_registers): Likewise.
4319         (store_all_gp_regs): Likewise.
4320         (store_ppc_registers): Likewise.
4321         (hwdebug_insert_point): Likewise.
4322         (can_use_watchpoint_cond_accel): Likewise.
4323         * remote-sim.c (gdb_os_write_stdout): Likewise.
4324
4325 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4326             Tom Tromey  <tom@tromey.com>
4327
4328         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4329         test for it.
4330         * configure: Rebuild.
4331
4332 2018-07-22  Tom Tromey  <tom@tromey.com>
4333
4334         * regformats/regdat.sh: Define xmltarget_${name} inside
4335         #ifndef IN_PROCESS_AGENT.
4336
4337 2018-07-22  Tom Tromey  <tom@tromey.com>
4338
4339         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4340
4341 2018-07-22  Tom Tromey  <tom@tromey.com>
4342
4343         * symfile.c (reread_symbols): Notify iter, not objfile.
4344
4345 2018-07-22  Tom Tromey  <tom@tromey.com>
4346
4347         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4348         Use arch_ops.
4349         (ravenscar_thread_target::prepare_to_store): Likewise.
4350
4351 2018-07-22  Tom Tromey  <tom@tromey.com>
4352
4353         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4354         unused variable.  Call value_fetch_lazy when needed.
4355         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4356         Remove unused variable.  Call value_fetch_lazy when needed.
4357
4358 2018-07-22  Tom Tromey  <tom@tromey.com>
4359
4360         * m32c-tdep.c (mark_dma): Return void.
4361         (make_regs): Remove unused declarations.
4362
4363 2018-07-22  Tom Tromey  <tom@tromey.com>
4364
4365         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4366         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4367         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4368         bkscm_get_valid_block_smob_arg_unsafe for effect.
4369
4370 2018-07-22  Tom Tromey  <tom@tromey.com>
4371
4372         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4373         value_type.
4374
4375 2018-07-22  Tom Tromey  <tom@tromey.com>
4376
4377         * windows-nat.c (saved_context): Conditionally define.
4378         * remote.c (remote_target::remote_btrace_maybe_reopen):
4379         Conditionally declare "warned".
4380         * inflow.c (sigquit_ours): Conditionally define.
4381         (new_tty): Move "tty" declaration inside #if.
4382         * guile/guile.c (guile_datadir): Conditionally define.
4383         * charset.c (set_be_le_names): Move some declarations inside #if.
4384         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4385         #if.
4386         (parse_xml_btrace_conf): Likewise.
4387
4388 2018-07-22  Tom Tromey  <tom@tromey.com>
4389
4390         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4391
4392 2018-07-22  Tom Tromey  <tom@tromey.com>
4393
4394         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4395         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4396         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4397         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4398         * stack.c (frame_apply_level_command): Remove unused variable.
4399         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4400         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4401         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4402         unused variable.
4403         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4404         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4405         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4406         variable.
4407         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4408         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4409         variable.
4410         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4411         Remove unused variable.
4412         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4413         variable.
4414         * common/tdesc.c (print_xml_feature::visit): Remove unused
4415         variable.
4416         * compile/compile-object-load.c (store_regs): Remove unused
4417         variables.
4418         * complaints.c (clear_complaints): Remove unused variable.
4419         * corelow.c (core_target_open): Remove unused variable.
4420         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4421         variable.
4422         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4423         variable.
4424         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4425         variable.
4426         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4427         variable.
4428         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4429         variable.
4430         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4431         variable.
4432         * ia64-tdep.c (examine_prologue): Remove unused variable.
4433         * infcall.c (run_inferior_call): Remove unused variable.
4434         * inferior.c (exit_inferior): Remove unused variable.
4435         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4436         * linespec.c (decode_line_2): Remove unused variable.
4437         * linux-nat.c (super_close): Remove.
4438         * linux-tdep.c (linux_info_proc): Remove unused variable.
4439         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4440         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4441         Remove unused variable.
4442         * parse.c (find_minsym_type_and_address): Remove unused variable.
4443         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4444         variable.
4445         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4446         variable.
4447         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4448         variables.
4449         * record-btrace.c (record_btrace_target::store_registers): Remove
4450         unused variable.
4451         (cmd_show_record_btrace_cpu): Remove unused variable.
4452         * riscv-tdep.c (riscv_register_reggroup_p)
4453         (riscv_push_dummy_call, riscv_return_value): Remove unused
4454         variable.
4455         * rust-exp.y (literal): Remove unused variable.
4456         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4457         unused variable.
4458         <STRUCTOP_ANONYMOUS>: Likewise.
4459         * s390-linux-tdep.c (s390_linux_init_abi_31)
4460         (s390_linux_init_abi_64): Remove unused variable.
4461         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4462         (file_select_thread, net_windows_open, _initialize_ser_windows):
4463         Remove unused variables.
4464         * symtab.c (find_pc_sect_line): Remove unused variable.
4465         * target-memory.c (compute_garbled_blocks): Remove unused
4466         variable.
4467         (target_write_memory_blocks): Remove unused variable.
4468         * target.c (target_stack::unpush): Remove unused variables.
4469         * tracepoint.c (start_tracing, all_tracepoint_actions)
4470         (merge_uploaded_trace_state_variables)
4471         (print_one_static_tracepoint_marker): Remove unused variable.
4472         * unittests/basic_string_view/element_access/char/1.cc (test01):
4473         Remove unused variable.
4474         * windows-nat.c (windows_continue, windows_add_all_dlls)
4475         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4476         Remove unused variables.
4477
4478 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4479
4480         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4481         attr_profile in HAVE_ELF.
4482         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4483         HAVE_ELF.
4484
4485 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4486
4487         * frame.c (frame_register_unwind): Change parameter name.
4488         (frame_unwind_register): Likewise.
4489         (frame_unwind_register_value): Likewise.
4490         (frame_unwind_register_signed): Likewise.
4491         (frame_unwind_register_unsigned): Likewise.
4492         * frame.h (frame_register_unwind): Likewise.
4493         (frame_unwind_register): Likewise.
4494         (frame_unwind_register_value): Likewise.
4495         (frame_unwind_register_signed): Likewise.
4496         (frame_unwind_register_unsigned): Likewise.
4497         (frame_unwind_arch): Likewise.
4498
4499 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4500
4501         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4502         ISA maintenance.
4503
4504 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4505
4506         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4507         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4508         hand.
4509
4510 2018-07-20  Keith Seitz  <keiths@redhat.com>
4511
4512         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4513         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4514         m_compunit_symtab, m_language>: Add "m_" prefix.
4515         Update all uses.
4516         * buildsym.c: Update all uses.
4517
4518 2018-07-20  Tom Tromey  <tom@tromey.com>
4519
4520         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4521         * buildsym.h (record_line_ftype): Remove typedef.
4522
4523 2018-07-20  Tom Tromey  <tom@tromey.com>
4524
4525         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4526         (end_expandable_symtab): Likewise.
4527         (end_symtab_get_static_block): Likewise.
4528         (end_symtab_from_static_block): Likewise.
4529         * buildsym-legacy.c (augment_type_symtab): Remove.
4530         (end_expandable_symtab): Remove.
4531         (end_symtab_get_static_block): Remove.
4532         (end_symtab_from_static_block): Remove.
4533
4534 2018-07-20  Tom Tromey  <tom@tromey.com>
4535
4536         * dwarf2read.c: Include buildsym.h.
4537         (struct dwarf2_cu) <builder>: New method.
4538         (fixup_go_packaging): Update.
4539         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4540         use scoped_free_pendings.
4541         (using_directives): Add "cu" parameter, remove "language".
4542         (read_import_statement, setup_type_unit_groups, )
4543         (read_func_scope, read_lexical_block_scope)
4544         (dwarf2_record_block_ranges, read_namespace): Update.
4545         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4546         (lnp_state_machine::handle_end_sequence): Update.
4547         (class lnp_state_machine) <m_cu>: New member.
4548         <m_record_line_callback>: Remove.
4549         <m_currently_recording_lines>: New member.
4550         (lnp_state_machine::handle_set_file): Update.
4551         (noop_record_line): Remove.
4552         (dwarf_record_line_p): Add cu parameter.
4553         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4554         (lnp_state_machine::record_line)
4555         (lnp_state_machine::lnp_state_machine)
4556         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4557         (dwarf_decode_lines): Update.
4558         (dwarf2_start_subfile): Add cu parameter.
4559         (dwarf2_start_symtab, new_symbol): Update.
4560         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4561         Remove dwarf2_per_objfile parameter.
4562         (dwarf_decode_macros): Update.
4563
4564 2018-07-20  Tom Tromey  <tom@tromey.com>
4565
4566         * stabsread.c (define_symbol): Update.
4567         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4568         * dwarf2read.c (new_symbol): Update.
4569         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4570         * cp-namespace.c: Include buildsym.h.
4571         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4572         * buildsym-legacy.c (get_buildsym_compunit): New function.
4573
4574 2018-07-20  Tom Tromey  <tom@tromey.com>
4575
4576         * xcoffread.c: Include buildsym-legacy.h.
4577         * windows-nat.c: Include buildsym-legacy.h.
4578         * stabsread.c: Include buildsym-legacy.h.
4579         * mdebugread.c: Include buildsym-legacy.h.
4580         * buildsym-legacy.h: New file.
4581         * buildsym-legacy.c: New file, from buildsym.c.
4582         * go32-nat.c: Include buildsym-legacy.h.
4583         * dwarf2read.c: Include buildsym-legacy.h.
4584         * dbxread.c: Include buildsym-legacy.h.
4585         * cp-namespace.c: Include buildsym-legacy.h.
4586         * coffread.c: Include buildsym-legacy.h.
4587         * buildsym.h: Move some contents to buildsym-legacy.h.
4588         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4589         buildsym-legacy.c.
4590         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4591
4592 2018-07-20  Tom Tromey  <tom@tromey.com>
4593
4594         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4595         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4596         (buildsym_compunit::buildsym_compunit)
4597         (buildsym_compunit::~buildsym_compunit)
4598         (buildsym_compunit::get_macro_table): Define.
4599
4600 2018-07-20  Tom Tromey  <tom@tromey.com>
4601
4602         * buildsym.c (reset_symtab_globals): Remove.
4603         (buildsym_compunit::end_symtab_from_static_block): Update.
4604         (buildsym_compunit::augment_type_symtab): Update.
4605         (end_symtab_from_static_block): Call free_buildsym_compunit.
4606         (augment_type_symtab, end_symtab, end_expandable_symtab):
4607         Likewise.
4608
4609 2018-07-20  Tom Tromey  <tom@tromey.com>
4610
4611         * arch-utils.c: Do not include buildsym.h.
4612         * mipsread.c: Do not include buildsym.h.
4613         * machoread.c: Do not include buildsym.h.
4614         * elfread.c: Do not include buildsym.h.
4615
4616 2018-07-20  Tom Tromey  <tom@tromey.com>
4617
4618         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4619         initialization.
4620         (buildsym_compunit): Add new constructor.
4621         (struct buildsym_compunit) <get_last_source_file, finish_block,
4622         record_block_range, start_subfile, patch_subfile_names,
4623         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4624         set_last_source_start_addr, get_last_source_start_addr,
4625         get_local_using_directives, set_local_using_directives,
4626         get_global_using_directives, outermost_context_p,
4627         get_current_context_stack, get_context_stack_depth,
4628         get_current_subfile, get_local_symbols, get_file_symbols,
4629         get_global_symbols, record_debugformat, record_producer,
4630         push_context, pop_context, end_symtab_get_static_block,
4631         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4632         New public methods.
4633         <record_pending_block, finish_block_internal, make_blockvector,
4634         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4635         private methods.
4636         Update all users.
4637
4638 2018-05-22  Tom Tromey  <tom@tromey.com>
4639
4640         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4641         parameter.
4642         (finish_block_internal): Update.
4643
4644 2018-07-20  Tom Tromey  <tom@tromey.com>
4645
4646         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4647         parameter.
4648         (finish_block_internal): Update.
4649
4650 2018-07-20  Tom Tromey  <tom@tromey.com>
4651
4652         * buildsym.h (EXTERN): Don't define or undef.
4653         * buildsym.c (EXTERN): Don't define.
4654
4655 2018-07-20  Tom Tromey  <tom@tromey.com>
4656
4657         * buildsym.c: Remove TODO comment.
4658
4659 2018-07-20  Tom Tromey  <tom@tromey.com>
4660
4661         * coffread.c (coff_symtab_read): Update.
4662         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4663         (xcoff_new_init): Update.
4664         * mipsread.c (mipscoff_new_init): Update.
4665         * mdebugread.c (mdebug_build_psymtabs): Update.
4666         * elfread.c (elf_new_init): Update.
4667         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4668         Update.
4669         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4670         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4671         (stabsect_build_psymtabs): Update.
4672         * buildsym.h (buildsym_init): Don't declare.
4673         * buildsym.c: Update comment.
4674         (prepare_for_building): Remove.
4675         (start_symtab, restart_symtab): Update.
4676         (reset_symtab_globals): Update comment.
4677         (buildsym_init): Remove.
4678
4679 2018-07-20  Tom Tromey  <tom@tromey.com>
4680
4681         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4682         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4683         (read_enum_type, common_block_start, common_block_end)
4684         (cleanup_undefined_types_1, finish_global_stabs): Update.
4685         * mdebugread.c (psymtab_to_symtab_1): Update.
4686         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4687         (read_lexical_block_scope, new_symbol): Update.
4688         * dbxread.c (process_one_symbol): Update.
4689         * coffread.c (coff_symtab_read, process_coff_symbol)
4690         (coff_read_enum_type): Update.
4691         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4692         declare.
4693         (get_local_symbols, get_file_symbols, get_global_symbols): New
4694         functions.
4695         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4696         m_global_symbols.
4697         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4698         (~scoped_free_pendings): Update.
4699         (finish_block, prepare_for_building, reset_symtab_globals)
4700         (end_symtab_get_static_block, end_symtab_with_blockvector)
4701         (augment_type_symtab, push_context): Update.
4702         (get_local_symbols, get_file_symbols, get_global_symbols): New
4703         functions.
4704         (buildsym_init): Update.
4705
4706 2018-07-20  Tom Tromey  <tom@tromey.com>
4707
4708         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4709         (process_full_type_unit): Likewise.
4710         (dwarf2_start_symtab): Set list_in_scope.
4711
4712 2018-07-20  Tom Tromey  <tom@tromey.com>
4713
4714         * dwarf2read.c (process_psymtab_comp_unit_reader)
4715         (build_type_psymtabs_reader): Do not set list_in_scope.
4716
4717 2018-07-20  Tom Tromey  <tom@tromey.com>
4718
4719         * buildsym.c (free_pendings): Remove.
4720         (add_symbol_to_list, scoped_free_pendings)
4721         (finish_block_internal, buildsym_init): Update.
4722
4723 2018-07-20  Tom Tromey  <tom@tromey.com>
4724
4725         * xcoffread.c (read_xcoff_symtab): Update.
4726         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4727         Update.
4728         * dbxread.c (process_one_symbol): Update.
4729         * coffread.c (coff_symtab_read): Update.
4730         * buildsym.h (finish_block): Update.
4731         * buildsym.c (finish_block): Remove "listhead" argument.
4732         (end_symtab_get_static_block): Update.
4733
4734 2018-07-20  Tom Tromey  <tom@tromey.com>
4735
4736         * buildsym.h (class scoped_free_pendings): Remove constructor.
4737         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4738         method.
4739         <m_pending_block_obstack, m_pending_blocks>: New members.
4740         (pending_block_obstack, pending_blocks): Remove.
4741         (scoped_free_pendings::scoped_free_pendings): Default.
4742         (~scoped_free_pendings): Update.
4743         (free_pending_blocks): Remove.
4744         (finish_block_internal, record_pending_block, make_blockvector)
4745         (end_symtab_get_static_block, augment_type_symtab, push_context)
4746         (buildsym_init): Update.
4747
4748 2018-07-20  Tom Tromey  <tom@tromey.com>
4749
4750         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4751         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4752         members.
4753         (pending_addrmap, pending_addrmap_obstack)
4754         (pending_addrmap_interesting): Remove.
4755         (scoped_free_pendings, record_block_range, make_blockvector)
4756         (prepare_for_building, reset_symtab_globals, buildsym_init):
4757         Update.
4758
4759 2018-07-20  Tom Tromey  <tom@tromey.com>
4760
4761         * xcoffread.c (process_linenos): Update.
4762         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4763         * mdebugread.c (psymtab_to_symtab_1): Update.
4764         * dwarf2read.c (setup_type_unit_groups)
4765         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4766         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4767         * dbxread.c (process_one_symbol): Update.
4768         * coffread.c (coff_symtab_read, enter_linenos)
4769         (process_coff_symbol): Update.
4770         * buildsym.h (current_subfile): Don't declare.
4771         (get_current_subfile): Declare.
4772         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4773         member.
4774         (start_subfile, free_buildsym_compunit, push_subfile)
4775         (prepare_for_building, start_symtab): Update.
4776         (get_current_subfile): New function.
4777
4778 2018-07-20  Tom Tromey  <tom@tromey.com>
4779
4780         * coffread.c (coff_symtab_read): Update.
4781         * xcoffread.c (read_xcoff_symtab): Update.
4782         * dwarf2read.c (new_symbol): Update.
4783         (read_func_scope, read_lexical_block_scope): Update.
4784         * dbxread.c (process_one_symbol): Update.
4785         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4786         (outermost_context_p): Remove macro.
4787         (outermost_context_p, get_current_context_stack)
4788         (get_context_stack_depth): Declare.
4789         (pop_context): Return struct context_stack.
4790         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4791         member.
4792         (context_stack_size): Remove.
4793         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4794         (prepare_for_building, end_symtab_get_static_block)
4795         (augment_type_symtab, push_context): Update.
4796         (pop_context): Return struct context_stack.
4797         (outermost_context_p, get_current_context_stack)
4798         (get_context_stack_depth): New functions.
4799         (buildsym_init): Update.
4800
4801 2018-07-20  Tom Tromey  <tom@tromey.com>
4802
4803         * rust-exp.y: Now a pure parser.  Update all rules.
4804         (%union): Move earlier.
4805         (current_parser, work_obstack): Remove globals.
4806         (rust_parser, ~rust_parser): Update.
4807         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4808         lex_character, lex_number, lex_string, lex_identifier,
4809         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4810         convert_name, convert_params_to_expression,
4811         convert_ast_to_expression, ast_basic_type, ast_operation,
4812         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4813         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4814         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4815         ast_array_type, ast_slice_type, ast_reference_type,
4816         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4817         (rust_parse): Update.
4818         (rustyyerror, rustyylex): Add parser parameter.
4819         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4820         (rust_lex_stringish_test, rust_lex_test_sequence)
4821         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4822         (rust_lex_test_push_back, rust_lex_tests): Update.
4823
4824 2018-07-19  Pedro Alves  <palves@redhat.com>
4825
4826         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4827         gdb::unique_xmalloc_ptr.
4828         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4829         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4830         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4831         copy-initialization.
4832         * guile/scm-pretty-print.c (ppscm_print_children): Use
4833         gdb::unique_xmalloc_ptr instead of cleanups.
4834         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4835         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4836         gdb::unique_xmalloc_ptr.
4837         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4838         Adjust to use gdb::unique_xmalloc_ptr.
4839         * guile/scm-utils.c (extract_arg): Adjust.
4840         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4841         gdb::unique_xmalloc_ptr instead of a cleanup.
4842
4843 2018-07-19  Tom Tromey  <tom@tromey.com>
4844
4845         * utils.c (do_value_free_to_mark)
4846         (make_cleanup_value_free_to_mark): Remove.
4847         * utils.h (make_cleanup_value_free_to_mark): Remove.
4848
4849 2018-07-19  Pedro Alves  <palves@redhat.com>
4850
4851         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4852         forwarding reference.
4853
4854 2018-07-18  Pedro Alves  <palves@redhat.com>
4855
4856         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4857         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4858         cleanup.
4859
4860 2018-07-18  Pedro Alves  <palves@redhat.com>
4861
4862         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4863         exceptions.
4864         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4865         (gdbscm_wrap): New.
4866         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4867         directly instead of a cleanup.
4868         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4869         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4870         (vlscm_binop_gdbthrow): New, factored out from ...
4871         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4872         (vlscm_rich_compare): Use gdbscm_wrap.
4873         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4874         instead of a cleanup.
4875         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4876         cleanup.
4877         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4878         Use xfree directly instead of a cleanup.
4879         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4880         Adjust to use gdbscm_wrap and scoped_value_mark.
4881         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4882         (gdbscm_value_address, gdbscm_value_dereference)
4883         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4884         scoped_value_mark.
4885         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4886         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4887         scoped_value_mark.
4888         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4889         gdbscm_wrap and scoped_value_mark.
4890         (gdbscm_value_to_string): Use xfree directly instead of a
4891         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4892         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4893         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4894         scoped_value_mark.
4895         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4896         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4897         scoped_value_mark.
4898         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4899         gdbscm_wrap.
4900
4901 2018-07-18  Tom de Vries  <tdevries@suse.de>
4902
4903         * findvar.c (default_read_var_value): Also resolve dynamic type for
4904         LOC_OPTIMIZED_OUT vars.
4905
4906 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4907
4908         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4909         decoding.
4910
4911 2018-07-17  Tom Tromey  <tom@tromey.com>
4912
4913         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4914         (compute_enum_list, pascm_set_param_value_x)
4915         (gdbscm_parameter_value): Update.
4916         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4917         (gdbscm_scm_to_host_string): Update.
4918         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4919         Update.
4920         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4921         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4922         * guile/scm-string.c (gdbscm_scm_to_string): Return
4923         unique_xmalloc_ptr.
4924         (gdbscm_scm_to_host_string): Likewise.
4925
4926 2018-07-17  Tom Tromey  <tom@tromey.com>
4927
4928         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4929         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4930         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4931         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4932         unique_xmalloc_ptr.
4933
4934 2018-07-17  Tom Tromey  <tom@tromey.com>
4935
4936         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4937         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4938         Update.
4939         * guile/scm-cmd.c (cmdscm_function): Update.
4940         * guile/scm-pretty-print.c
4941         (ppscm_print_exception_unless_memory_error): Update.
4942         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4943         Return unique_xmalloc_ptr.
4944
4945 2018-07-17  Tom Tromey  <tom@tromey.com>
4946
4947         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4948         Use string_printf.
4949
4950 2018-07-17  Jim Wilson  <jimw@sifive.com>
4951
4952         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4953         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4954         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4955         unecessary braces after EF_RISCV_RVC test.  Delete call to
4956         set_gdbarch_decr_pc_after_break.
4957
4958         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4959         RISCV_LAST_FP_REGNUM + 1.
4960         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4961
4962 2018-07-17  Tom Tromey  <tom@tromey.com>
4963
4964         * configure.ac: Remove --disable-gdbcli.
4965         * configure: Rebuild.
4966         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4967         (SUBDIR_CLI_CFLAGS): Remove.
4968         (SFILES): Use SUBDIR_CLI_SRCS.
4969         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4970
4971 2018-07-17  Tom Tromey  <tom@tromey.com>
4972
4973         PR gdb/18624:
4974         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4975
4976 2018-07-16  Jim Wilson  <jimw@sifive.com>
4977
4978         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4979
4980 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4981
4982         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4983         variable.
4984         (libunwind_frame_sniffer): Likewise.
4985         (libunwind_frame_prev_register): Likewise.
4986         (libunwind_sigtramp_frame_sniffer): Likewise.
4987         * ia64-tdep.c (ia64_access_reg): Likewise.
4988         (ia64_access_rse_reg): Likewise.
4989         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4990         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4991
4992 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4993
4994         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4995
4996 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4997
4998         * remote-sim.c (gdbsim_target::close,
4999         gdbsim_target::mourn_inferior): Remove unused variables.
5000
5001 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5002
5003         * ia64-tdep.c (ktab_buf): New global.
5004         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5005         (get_kernel_table): Adjust.
5006
5007 2018-07-16  Tom Tromey  <tom@tromey.com>
5008
5009         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5010         * dwarf2read.c (using_directives, new_symbol): Use
5011         outermost_context_p.
5012         * dbxread.c (process_one_symbol): Use outermost_context_p.
5013         * coffread.c (coff_symtab_read): Use outermost_context_p.
5014
5015 2018-07-16  Tom Tromey  <tom@tromey.com>
5016
5017         * dwarf2read.c (using_directives, read_func_scope)
5018         (read_lexical_block_scope): Update.
5019         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5020         * buildsym.h (local_using_directives, global_using_directives):
5021         Don't declare.
5022         (get_local_using_directives, set_local_using_directives)
5023         (get_global_using_directives): Declare.
5024         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5025         m_global_using_directives>: New members.
5026         (finish_block_internal, prepare_for_building)
5027         (reset_symtab_globals, end_symtab_get_static_block)
5028         (push_context): Update.
5029         (get_local_using_directives, set_local_using_directives)
5030         (get_global_using_directives): New functions.
5031         (buildsym_init): Update.
5032
5033 2018-07-16  Tom Tromey  <tom@tromey.com>
5034
5035         * xcoffread.c (xcoff_initial_scan): Don't call
5036         free_pending_blocks.
5037         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5038         * buildsym.h (class scoped_free_pendings): Add constructor.
5039         (free_pending_blocks): Don't declare.
5040         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5041         (free_pending_blocks): Now static.
5042
5043 2018-07-16  Tom Tromey  <tom@tromey.com>
5044
5045         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5046         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5047         member.
5048         (struct subfile_stack): Remove.
5049         (subfile_stack): Remove.
5050         (push_subfile, pop_subfile, buildsym_init): Update.
5051
5052 2018-07-16  Tom Tromey  <tom@tromey.com>
5053
5054         * buildsym.c (push_subfile): Use gdb_assert.
5055         (pop_subfile): Use gdb_assert.
5056
5057 2018-07-16  Tom Tromey  <tom@tromey.com>
5058
5059         * buildsym.h (merge_symbol_lists): Remove.
5060         * buildsym.c (merge_symbol_lists): Remove.
5061
5062 2018-07-16  Tom Tromey  <tom@tromey.com>
5063
5064         * stabsread.c (scan_file_globals): Update comment.
5065         * stabsread.h (scan_file_globals): Move from buildsym.h.
5066         * buildsym.h (scan_file_globals): Move to stabsread.h.
5067
5068 2018-07-16  Tom Tromey  <tom@tromey.com>
5069
5070         * xcoffread.c (xcoff_new_init): Update.
5071         * mipsread.c (mipscoff_new_init): Update.
5072         * mdebugread.c (mdebug_build_psymtabs): Update.
5073         * elfread.c (elf_new_init): Update.
5074         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5075         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5076         * buildsym.h (buildsym_new_init): Don't declare.
5077         * buildsym.c (buildsym_new_init): Remove.
5078
5079 2018-07-16  Tom Tromey  <tom@tromey.com>
5080
5081         * stabsread.h (within_function): Move from buildsym.h.
5082         * stabsread.c (start_stabs): Clear within_function.
5083         * coffread.c (coff_start_symtab): Clear within_function.
5084         * buildsym.h (within_function): Move to stabsread.h.
5085         * buildsym.c (prepare_for_building): Update.
5086
5087 2018-07-16  Tom Tromey  <tom@tromey.com>
5088
5089         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5090         * dwarf2read.c (dwarf2_start_symtab): Don't set
5091         processing_gcc_compilation.
5092         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5093
5094 2018-07-16  Tom Tromey  <tom@tromey.com>
5095
5096         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5097         (next_symbol_text_func): Move from buildsym.h.
5098         * stabsread.c (hashname): Move from buildsym.c.
5099         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5100         (next_symbol_text_func, hashname): Move to stabsread.h.
5101         * buildsym.c: Don't include bcache.h
5102         (hashname): Move to stasbread.c.
5103
5104 2018-07-16  Tom Tromey  <tom@tromey.com>
5105
5106         * buildsym.h (context_stack_size): Don't declare.
5107         * buildsym.c (context_stack_size): New global.
5108
5109 2018-07-16  Tom Tromey  <tom@tromey.com>
5110
5111         * dbxread.c (processing_acc_compilation): New global.
5112         * buildsym.h (processing_acc_compilation): Don't declare.
5113
5114 2018-07-16  Tom Tromey  <tom@tromey.com>
5115
5116         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5117         * dbxread.c (read_ofile_symtab): Update.
5118         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5119         * buildsym.h (last_source_start_addr): Remove.
5120         (set_last_source_start_addr, get_last_source_start_addr):
5121         Declare.
5122         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5123         parameter.
5124         (struct buildsym_compunit) <m_last_source_start_addr>: New
5125         member.
5126         (prepare_for_building): Remove start_addr parameter.
5127         (start_symtab, restart_symtab, end_symtab_get_static_block)
5128         (end_symtab_with_blockvector): Update.
5129         (set_last_source_start_addr, get_last_source_start_addr): New
5130         functions.
5131
5132 2018-07-16  Tom Tromey  <tom@tromey.com>
5133
5134         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5135         member.
5136         (have_line_numbers): Remove.
5137         (record_line, prepare_for_building, end_symtab_get_static_block)
5138         (augment_type_symtab): Update.
5139
5140 2018-07-16  Tom Tromey  <tom@tromey.com>
5141
5142         * buildsym.c (~buildsym_compunit): Free the macro table.
5143         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5144         methods.
5145         <m_pending_macros>: New member.
5146         (pending_macros): Remove.
5147         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5148         (reset_symtab_globals, end_symtab_get_static_block)
5149         (end_symtab_with_blockvector, augment_type_symtab)
5150         (buildsym_init): Update.
5151
5152 2018-07-16  Tom Tromey  <tom@tromey.com>
5153
5154         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5155         parameter.
5156         (buildsym_compunit::set_last_source_file): New method.
5157         <m_last_source_file>: New member.
5158         (prepare_for_building): Remove "name" parameter.
5159         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5160         (last_source_file): Remove.
5161         (set_last_source_file, get_last_source_file): Update.
5162
5163 2018-07-16  Tom Tromey  <tom@tromey.com>
5164
5165         * buildsym.c (prepare_for_building): Add assert.
5166
5167 2018-07-16  Tom Tromey  <tom@tromey.com>
5168
5169         * buildsym.c (~buildsym_compunit): Update.
5170         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5171         (start_subfile, patch_subfile_names)
5172         (end_symtab_with_blockvector): Update.
5173
5174 2018-07-16  Tom Tromey  <tom@tromey.com>
5175
5176         * buildsym.c (struct buildsym_compunit): Add constructor,
5177         destructor, initializers.
5178         (start_buildsym_compunit): Remove.
5179         (free_buildsym_compunit): Use "delete".
5180         (start_symtab, restart_symtab): Use "new".
5181
5182 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5183
5184         * symfile.c (set_objfile_default_section_offset): Remove struct
5185         keyword.
5186
5187 2018-07-14  Stafford Horne  <shorne@gmail.com>
5188
5189         * (Responsible Maintainers): Add myself as or1k maintainer.
5190
5191 2018-07-13  Tom Tromey  <tom@tromey.com>
5192
5193         * symfile.c (set_objfile_default_section_offset): Use extra braces
5194         around initializer.
5195
5196 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5197
5198         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5199         non-branching basr.
5200
5201 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5202
5203         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5204         unittests/cli-utils-selftests.c
5205         * unittests/cli-utils-selftests.c: New file.
5206
5207 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5208
5209         * NEWS: Mention new commands. Mention change to 'thread apply'.
5210
5211 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5212
5213         * thread.c (thr_try_catch_cmd): New function.
5214         (thread_apply_all_command): Handle qcs flags.
5215         (thread_apply_command): Handle qcs flags.
5216         (taas_command): New function.
5217         (tfaas_command): New function.
5218         (_initialize_thread): Update to setup the new commands 'taas
5219         and 'tfaas'. Change doc string for 'thread apply'.
5220
5221 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5222
5223         * stack.c: (trailing_outermost_frame): New function, mostly
5224         extracted from backtrace_command_1.
5225         (leading_innermost_frame): New function.
5226         (backtrace_command_1): Update to call trailing_outermost_frame.
5227         (frame_apply_command_count): New function.
5228         (frame_apply_level_command): New function.
5229         (frame_apply_all_command): New function.
5230         (frame_apply_command): New function.
5231         (faas_command): New function.
5232         (frame_cmd_list): New variable.
5233         (_initialize_stack): Update to setup the new commands 'frame apply'
5234         and 'faas'.
5235
5236 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5237
5238         * cli-utils.c (number_or_range_parser::get_number): Only handle
5239         numbers or convenience var as numbers.
5240         (parse_flags): New function.
5241         (parse_flags_qcs): New function.
5242         (number_or_range_parser::finished): Ensure parsing end is detected
5243         before end of string.
5244         * cli-utils.h (parse_flags): New function.
5245         (parse_flags_qcs): New function.
5246         (number_or_range_parser): Remove m_finished bool.
5247         (number_or_range_parser::skip_range): Set m_in_range to false.
5248
5249 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5250
5251         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5252         on Windows.
5253
5254 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5255             Jan Kratochvil  <jan.kratochvil@redhat.com>
5256             Paul Fertser  <fercerpav@gmail.com>
5257             Tsutomu Seki  <sekiriki@gmail.com>
5258             Pedro Alves  <palves@redhat.com>
5259
5260         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5261         'unittests/parse-connection-spec-selftests.c'.
5262         (COMMON_SFILES): Add 'common/netstuff.c'.
5263         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5264         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5265         * common/netstuff.c: New file.
5266         * common/netstuff.h: New file.
5267         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5268         (wait_for_connect): Update comment.  New parameter
5269         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5270         Use 'sock' directly instead of 'scb->fd'.
5271         (try_connect): New function, with code from 'net_open'.
5272         (net_open): Rewrite main loop to deal with multiple
5273         sockets/addresses.  Handle IPv6-style hostnames; implement
5274         support for IPv6 connections.
5275         * unittests/parse-connection-spec-selftests.c: New file.
5276
5277 2018-07-11  Pedro Alves  <palves@redhat.com>
5278
5279         PR gdb/23377
5280         * remote.c (remote_target::remote_detach_pid): Call
5281         set_current_process.
5282
5283 2018-07-11  Pedro Alves  <palves@redhat.com>
5284
5285         * h8300-tdep.c (h8300_gdbarch_init): Remove
5286         set_gdbarch_ecoff_reg_to_regnum calls.
5287
5288 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5289
5290         PR c++/23373
5291         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5292         offsets/sizes for static members of a class/struct.
5293
5294 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5295
5296         * target-descriptions.c (tdesc_register_bitsize): Rename.
5297         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5298         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5299         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5300
5301 2018-07-10  Tom Tromey  <tom@tromey.com>
5302
5303         * breakpoint.c (moribund_locations): Now static and a
5304         std::vector.
5305         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5306         (build_bpstat_chain, update_global_location_list)
5307         (breakpoint_retire_moribund): Update.
5308         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5309         VEC.
5310
5311 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5312
5313         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5314         (riscv_register_reggroup_p): Use new function, remove unneeded
5315         parenthesis.
5316         (riscv_push_dummy_call): Extend assert to compare against xlen or
5317         flen based on register type.
5318
5319 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5320
5321         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5322
5323 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5324
5325         * remote.c (show_hardware_watchpoint_limit): New function.
5326         (show_hardware_watchpoint_length_limit): New function.
5327         (show_hardware_breakpoint_limit): New function.
5328         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5329         where appropriate, update help text.
5330
5331 2018-07-09  Tom Tromey  <tom@tromey.com>
5332
5333         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5334         (CLIBS): Don't mention NAT_CLIBS.
5335
5336 2018-07-09  Tom Tromey  <tom@tromey.com>
5337
5338         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5339         (LIBGDB_OBS, clean mostlyclean): Update.
5340         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5341
5342 2018-07-09  Tom Tromey  <tom@tromey.com>
5343
5344         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5345         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5346         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5347
5348 2018-07-09  Tom Tromey  <tom@tromey.com>
5349
5350         * Makefile.in (ALLDEPFILES): Remove exec.c.
5351         (COMMON_OBS): Remove exec.o.
5352         (COMMON_SFILES): Add exec.c.
5353
5354 2018-07-09  Tom Tromey  <tom@tromey.com>
5355
5356         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5357
5358 2018-07-09  Tom Tromey  <tom@tromey.com>
5359
5360         * Makefile.in (clean mostlyclean): Remove stamp-version.
5361         (version.c): Depend on stamp-version.
5362         (stamp-version): New rule, from version.c rule.
5363
5364 2018-07-09  Tom Tromey  <tom@tromey.com>
5365
5366         * Makefile.in (init.c): Depend on stamp-init.
5367         (stamp-init): New rule, from init.c rule.
5368         (clean mostlyclean): Remove stamp-init.
5369
5370 2018-07-09  Tom Tromey  <tom@tromey.com>
5371
5372         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5373         SUBDIR_GCC_COMPILE_SRCS.
5374
5375 2018-07-09  Tom Tromey  <tom@tromey.com>
5376
5377         * Makefile.in (init.c): Remove some unused sed rules.
5378
5379 2018-07-09  Tom Tromey  <tom@tromey.com>
5380
5381         * Makefile.in (TSOBS): Remove.
5382         (INIT_FILES): Update.
5383         (LIBGDB_OBS): Update.
5384         (COMMON_SFILES): Add inflow.c.
5385         (SFILES): Remove inflow.c.
5386
5387 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5388
5389         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5390
5391 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5392
5393         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5394         get_saveloc_name, is_signal_frame_name, step_name,
5395         init_remote_name, create_addr_space_name,
5396         destroy_addr_space_name, search_unwind_table_name,
5397         find_dyn_list_name): Constify.
5398
5399 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5400
5401         * darwin-nat.c (darwin_pthread_kill): New function.
5402         (darwin_resume_thread): Use darwin_pthread_kill.
5403
5404 2018-07-05  Tom de Vries  <tdevries@suse.de>
5405
5406         * macroexp.c (macro_buffer) <operator=>: New member function.
5407
5408 2018-07-04  Tom Tromey  <tom@tromey.com>
5409
5410         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5411
5412 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5413
5414         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5415         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5416         * maint.c: Likewise.
5417         * top.c: Likewise.
5418
5419 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5420
5421         * NEWS: Create a new section for the next release branch.
5422         Rename the section of the current branch, now that it has
5423         been cut.
5424
5425 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5426
5427         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5428         * version.in: Bump version to 8.2.50.DATE-git.
5429
5430 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5431             Pedro Alves  <palves@redhat.com>
5432
5433         * linux-nat.c (linux_init_ptrace): Rename to ...
5434         (linux_init_ptrace_procfs): ... this.  Call
5435         linux_proc_init_warnings.
5436         (linux_nat_target::post_attach)
5437         (linux_nat_target::post_startup_inferior): Adjust.
5438         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5439         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5440
5441 2018-07-04  Tom de Vries  <tdevries@suse.de>
5442
5443         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5444         check ...
5445         (read_comp_unit_head): ... here.
5446
5447 2018-07-03  Tom Tromey  <tom@tromey.com>
5448
5449         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5450         (stop_tracing, tstatus_command)
5451         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5452         (print_one_static_tracepoint_marker): Update.
5453         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5454         std::vector.
5455         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5456         VEC.
5457         (all_tracepoints, static_tracepoints_here): Return std::vector.
5458
5459 2018-07-03  Tom Tromey  <tom@tromey.com>
5460
5461         * common/ptid.c (ptid_equal): Remove.
5462         * common/ptid.h (ptid_equal): Don't declare.
5463         * ada-tasks.c: Update.
5464         * breakpoint.c: Update.
5465         * common/agent.c: Update.
5466         * corelow.c: Update.
5467         * darwin-nat-info.c: Update.
5468         * darwin-nat.c: Update.
5469         * dcache.c: Update.
5470         * dtrace-probe.c: Update.
5471         * dummy-frame.c: Update.
5472         * fbsd-nat.c: Update.
5473         * frame.c: Update.
5474         * gdbthread.h: Update.
5475         * gnu-nat.c: Update.
5476         * go32-nat.c: Update.
5477         * inf-loop.c: Update.
5478         * inf-ptrace.c: Update.
5479         * infcall.c: Update.
5480         * infcmd.c: Update.
5481         * inflow.c: Update.
5482         * infrun.c: Update.
5483         * linux-fork.c: Update.
5484         * linux-nat.c: Update.
5485         * linux-thread-db.c: Update.
5486         * mi/mi-cmd-var.c: Update.
5487         * mi/mi-interp.c: Update.
5488         * mi/mi-main.c: Update.
5489         * nto-procfs.c: Update.
5490         * ppc-linux-tdep.c: Update.
5491         * procfs.c: Update.
5492         * python/py-inferior.c: Update.
5493         * python/py-record-btrace.c: Update.
5494         * python/py-record.c: Update.
5495         * ravenscar-thread.c: Update.
5496         * regcache.c: Update.
5497         * remote-sim.c: Update.
5498         * remote.c: Update.
5499         * sol-thread.c: Update.
5500         * solib.c: Update.
5501         * target.c: Update.
5502         * tui/tui-stack.c: Update.
5503         * varobj.c: Update.
5504         * windows-nat.c: Update.
5505         * windows-tdep.c: Update.
5506
5507 2018-07-03  Tom Tromey  <tom@tromey.com>
5508
5509         * common/ptid.c (ptid_match): Remove.
5510         * common/ptid.h (ptid_match): Don't declare.
5511         * fbsd-nat.c: Update.
5512         * infcmd.c: Update.
5513         * infrun.c: Update.
5514         * linux-nat.c: Update.
5515         * record-btrace.c: Update.
5516         * regcache.c: Update.
5517         * remote.c: Update.
5518
5519 2018-07-03  Tom Tromey  <tom@tromey.com>
5520
5521         * common/ptid.c (ptid_tid_p): Remove.
5522         * common/ptid.h (ptid_tid_p): Don't declare.
5523         * sol-thread.c: Update.
5524
5525 2018-07-03  Tom Tromey  <tom@tromey.com>
5526
5527         * common/ptid.c (ptid_lwp_p): Remove.
5528         * common/ptid.h (ptid_lwp_p): Don't declare.
5529         * fbsd-nat.c: Update.
5530         * linux-nat.c: Update.
5531         * nat/linux-procfs.c: Update.
5532         * nat/x86-linux-dregs.c: Update.
5533         * sol-thread.c: Update.
5534
5535 2018-07-03  Tom Tromey  <tom@tromey.com>
5536
5537         * common/ptid.c (ptid_is_pid): Remove.
5538         * common/ptid.h (ptid_is_pid): Don't declare.
5539         * infrun.c: Update.
5540         * linux-nat.c: Update.
5541         * mi/mi-interp.c: Update.
5542         * remote.c: Update.
5543         * thread.c: Update.
5544
5545 2018-07-03  Tom Tromey  <tom@tromey.com>
5546
5547         * common/ptid.c (ptid_get_tid): Remove.
5548         * common/ptid.h (ptid_get_tid): Don't declare.
5549         * ada-tasks.c: Update.
5550         * aix-thread.c: Update.
5551         * bsd-uthread.c: Update.
5552         * darwin-nat.c: Update.
5553         * fbsd-nat.c: Update.
5554         * i386-darwin-nat.c: Update.
5555         * infrun.c: Update.
5556         * linux-tdep.c: Update.
5557         * nto-procfs.c: Update.
5558         * ppc-ravenscar-thread.c: Update.
5559         * python/py-infthread.c: Update.
5560         * ravenscar-thread.c: Update.
5561         * sol-thread.c: Update.
5562         * sparc-ravenscar-thread.c: Update.
5563         * windows-nat.c: Update.
5564
5565 2018-07-03  Tom Tromey  <tom@tromey.com>
5566
5567         * common/ptid.c (ptid_get_lwp): Remove.
5568         * common/ptid.h (ptid_get_lwp): Don't declare.
5569         * aarch64-linux-nat.c: Update.
5570         * ada-tasks.c: Update.
5571         * aix-thread.c: Update.
5572         * amd64-linux-nat.c: Update.
5573         * arm-linux-nat.c: Update.
5574         * corelow.c: Update.
5575         * fbsd-nat.c: Update.
5576         * fbsd-tdep.c: Update.
5577         * gnu-nat.c: Update.
5578         * i386-cygwin-tdep.c: Update.
5579         * i386-gnu-nat.c: Update.
5580         * i386-linux-nat.c: Update.
5581         * ia64-linux-nat.c: Update.
5582         * inf-ptrace.c: Update.
5583         * infrun.c: Update.
5584         * linux-fork.c: Update.
5585         * linux-nat.c: Update.
5586         * linux-tdep.c: Update.
5587         * linux-thread-db.c: Update.
5588         * mips-linux-nat.c: Update.
5589         * nat/aarch64-linux-hw-point.c: Update.
5590         * nat/aarch64-linux.c: Update.
5591         * nat/linux-btrace.c: Update.
5592         * nat/linux-osdata.c: Update.
5593         * nat/linux-procfs.c: Update.
5594         * nat/x86-linux-dregs.c: Update.
5595         * obsd-nat.c: Update.
5596         * ppc-fbsd-nat.c: Update.
5597         * ppc-linux-nat.c: Update.
5598         * procfs.c: Update.
5599         * python/py-infthread.c: Update.
5600         * ravenscar-thread.c: Update.
5601         * remote.c: Update.
5602         * s390-linux-nat.c: Update.
5603         * sol-thread.c: Update.
5604         * sol2-tdep.c: Update.
5605         * spu-linux-nat.c: Update.
5606         * x86-linux-nat.c: Update.
5607         * xtensa-linux-nat.c: Update.
5608
5609 2018-07-03  Tom Tromey  <tom@tromey.com>
5610
5611         * common/ptid.c (ptid_get_pid): Remove.
5612         * common/ptid.h (ptid_get_pid): Don't declare.
5613         * aarch64-linux-nat.c: Update.
5614         * ada-lang.c: Update.
5615         * aix-thread.c: Update.
5616         * alpha-bsd-nat.c: Update.
5617         * amd64-fbsd-nat.c: Update.
5618         * amd64-linux-nat.c: Update.
5619         * arm-linux-nat.c: Update.
5620         * arm-nbsd-nat.c: Update.
5621         * auxv.c: Update.
5622         * break-catch-syscall.c: Update.
5623         * breakpoint.c: Update.
5624         * bsd-uthread.c: Update.
5625         * corelow.c: Update.
5626         * ctf.c: Update.
5627         * darwin-nat.c: Update.
5628         * fbsd-nat.c: Update.
5629         * fbsd-tdep.c: Update.
5630         * gcore.c: Update.
5631         * gnu-nat.c: Update.
5632         * hppa-nbsd-nat.c: Update.
5633         * hppa-obsd-nat.c: Update.
5634         * i386-fbsd-nat.c: Update.
5635         * ia64-linux-nat.c: Update.
5636         * inf-ptrace.c: Update.
5637         * infcmd.c: Update.
5638         * inferior.c: Update.
5639         * inferior.h: Update.
5640         * inflow.c: Update.
5641         * infrun.c: Update.
5642         * linux-fork.c: Update.
5643         * linux-nat.c: Update.
5644         * linux-tdep.c: Update.
5645         * linux-thread-db.c: Update.
5646         * m68k-bsd-nat.c: Update.
5647         * mi/mi-interp.c: Update.
5648         * mi/mi-main.c: Update.
5649         * mips-linux-nat.c: Update.
5650         * mips-nbsd-nat.c: Update.
5651         * mips64-obsd-nat.c: Update.
5652         * nat/aarch64-linux-hw-point.c: Update.
5653         * nat/aarch64-linux.c: Update.
5654         * nat/linux-btrace.c: Update.
5655         * nat/linux-osdata.c: Update.
5656         * nat/linux-procfs.c: Update.
5657         * nat/x86-linux-dregs.c: Update.
5658         * nto-procfs.c: Update.
5659         * obsd-nat.c: Update.
5660         * ppc-linux-nat.c: Update.
5661         * ppc-nbsd-nat.c: Update.
5662         * ppc-obsd-nat.c: Update.
5663         * proc-service.c: Update.
5664         * procfs.c: Update.
5665         * python/py-inferior.c: Update.
5666         * python/py-infthread.c: Update.
5667         * ravenscar-thread.c: Update.
5668         * record.c: Update.
5669         * remote-sim.c: Update.
5670         * remote.c: Update.
5671         * rs6000-nat.c: Update.
5672         * s390-linux-nat.c: Update.
5673         * sh-nbsd-nat.c: Update.
5674         * sol-thread.c: Update.
5675         * sparc-nat.c: Update.
5676         * sparc64-tdep.c: Update.
5677         * spu-linux-nat.c: Update.
5678         * spu-tdep.c: Update.
5679         * target-debug.h: Update.
5680         * target.c: Update.
5681         * thread.c: Update.
5682         * tid-parse.c: Update.
5683         * tracefile-tfile.c: Update.
5684         * vax-bsd-nat.c: Update.
5685         * windows-nat.c: Update.
5686         * x86-linux-nat.c: Update.
5687         * x86-nat.c: Update.
5688
5689 2018-07-03  Tom Tromey  <tom@tromey.com>
5690
5691         * common/ptid.c (pid_to_ptid): Remove.
5692         * common/ptid.h (pid_to_ptid): Don't declare.
5693         * aix-thread.c: Update.
5694         * arm-linux-nat.c: Update.
5695         * common/ptid.c: Update.
5696         * common/ptid.h: Update.
5697         * corelow.c: Update.
5698         * ctf.c: Update.
5699         * darwin-nat.c: Update.
5700         * fbsd-nat.c: Update.
5701         * fork-child.c: Update.
5702         * gnu-nat.c: Update.
5703         * go32-nat.c: Update.
5704         * inf-ptrace.c: Update.
5705         * infcmd.c: Update.
5706         * inferior.c: Update.
5707         * infrun.c: Update.
5708         * linux-fork.c: Update.
5709         * linux-nat.c: Update.
5710         * nat/aarch64-linux-hw-point.c: Update.
5711         * nat/fork-inferior.c: Update.
5712         * nat/x86-linux-dregs.c: Update.
5713         * nto-procfs.c: Update.
5714         * obsd-nat.c: Update.
5715         * procfs.c: Update.
5716         * progspace.c: Update.
5717         * remote.c: Update.
5718         * rs6000-nat.c: Update.
5719         * s390-linux-nat.c: Update.
5720         * sol-thread.c: Update.
5721         * spu-linux-nat.c: Update.
5722         * target.c: Update.
5723         * top.c: Update.
5724         * tracefile-tfile.c: Update.
5725         * windows-nat.c: Update.
5726
5727 2018-07-03  Tom Tromey  <tom@tromey.com>
5728
5729         * common/ptid.h (ptid_build): Don't declare.
5730         * common/ptid.c (ptid_build): Remove.
5731         * aix-thread.c: Update.
5732         * bsd-kvm.c: Update.
5733         * bsd-uthread.c: Update.
5734         * common/agent.c: Update.
5735         * common/ptid.c: Update.
5736         * common/ptid.h: Update.
5737         * corelow.c: Update.
5738         * darwin-nat.c: Update.
5739         * fbsd-nat.c: Update.
5740         * gnu-nat.c: Update.
5741         * linux-fork.c: Update.
5742         * linux-nat.c: Update.
5743         * linux-thread-db.c: Update.
5744         * nat/linux-osdata.c: Update.
5745         * nat/linux-procfs.c: Update.
5746         * nto-procfs.c: Update.
5747         * obsd-nat.c: Update.
5748         * proc-service.c: Update.
5749         * procfs.c: Update.
5750         * ravenscar-thread.c: Update.
5751         * remote-sim.c: Update.
5752         * remote.c: Update.
5753         * sol-thread.c: Update.
5754         * target.c: Update.
5755         * windows-nat.c: Update.
5756
5757 2018-07-03  Tom Tromey  <tom@tromey.com>
5758
5759         * infrun.c (follow_exec): Use exit_inferior_silent.
5760         * inferior.c (exit_inferior_num_silent): Remove.
5761         * inferior.h (exit_inferior_num_silent): Don't declare.
5762
5763 2018-07-03  Tom Tromey  <tom@tromey.com>
5764
5765         PR cli/23340:
5766         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5767         inferior_ptid on error.
5768
5769 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5770             Simon Marchi  <simon.marchi@polymtl.ca>
5771
5772         PR tdep/8282
5773         * disasm.h (gdb_disassembler): Add
5774         `m_disassembler_options_holder'. member
5775         * disasm.c (get_all_disassembler_options): New function.
5776         (gdb_disassembler::gdb_disassembler): Use it.
5777         (gdb_buffered_insn_length_init_dis): Likewise.
5778         (gdb_buffered_insn_length): Adjust accordingly.
5779         (set_disassembler_options): Handle options with arguments.
5780         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5781         line if showing options with descriptions.
5782         (disassembler_options_completer): Adapt to using the
5783         `disasm_options_and_args_t' structure.
5784         * mips-tdep.c (mips_disassembler_options): New variable.
5785         (mips_disassembler_options_o32): Likewise.
5786         (mips_disassembler_options_n32): Likewise.
5787         (mips_disassembler_options_n64): Likewise.
5788         (gdb_print_insn_mips): Don't set `disassembler_options'.
5789         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5790         functions.
5791         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5792         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5793         `gdbarch_disassembler_options_implicit' and
5794         `gdbarch_valid_disassembler_options'.
5795         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5796         `disasm_options_and_args_t' structure.
5797         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5798         method.
5799         (valid_disassembler_options): Switch from `disasm_options_t' to
5800         the `disasm_options_and_args_t' structure.
5801         * NEWS: Document `set disassembler-options' support for the MIPS
5802         target.
5803         * gdbarch.h: Regenerate.
5804         * gdbarch.c: Regenerate.
5805
5806 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5807
5808         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5809
5810 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5811
5812         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5813         parameter in call to amd64_target_description.
5814         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5815         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5816         (amd64fbsd_init_abi): Likewise.
5817         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5818         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5819         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5820         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5821
5822 2018-06-29  Pedro Alves  <palves@redhat.com>
5823
5824         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5825         "segments" parameter.
5826         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5827         (_initialize_amd64_tdep): Update call to
5828         amd64_create_target_description.
5829         (amd64_target_description): Add "segments" parameter.  Adjust
5830         the implementation to use it.
5831         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5832         call to amd64_create_target_description.
5833         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5834         * gdb/arch/amd64.h (amd64_create_target_description): Add
5835         "segments" register.
5836         * gdb/arch/amd64.c (amd64_create_target_description): Add
5837         "segments" parameter.  Call create_feature_i386_64bit_segments
5838         only if SEGMENTS is true.
5839         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5840         call to amd64_create_target_description.
5841
5842 2018-06-29  Pedro Alves  <palves@redhat.com>
5843
5844         * thread.c (thread_target_id_str): New, factored out from ...
5845         (print_thread_info_1): ... here.  Use it to compute the max
5846         "Target Id" column width.
5847
5848 2018-06-29  Pedro Alves  <palves@redhat.com>
5849
5850         * remote.c (remote_target::extra_thread_info): Delete
5851         'display_buf' and 'n' locals.  from the cache, regardless of
5852         packet mechanims is in use.  Use cache for qThreadExtra and qP
5853         methods too.
5854
5855 2018-06-29  Pedro Alves  <palves@redhat.com>
5856
5857         * blockframe.c (find_pc_sect_containing_function): New function.
5858         * breakpoint.c (print_breakpoint_location): Don't call
5859         find_pc_sect_function.
5860         * linespec.c (create_sals_line_offset): Record the location's
5861         symbol in the sal.
5862         * linespec.c (convert_address_location_to_sals): Fill in sal's
5863         symbol with find_pc_sect_containing_function.
5864         * symtab.c (find_function_start_sal): Rename to ...
5865         (find_function_start_sal_1): ... this.
5866         (find_function_start_sal): Reimplement as wrapper around
5867         find_function_start_sal_1, and use
5868         find_pc_sect_containing_function to fill in the sal's symbol.
5869         (find_function_start_sal(symbol*, bool)): Adjust.
5870         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5871         comments.
5872         (find_pc_sect_containing_function): Declare.
5873
5874 2018-06-29  Pedro Alves  <palves@redhat.com>
5875
5876         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5877         true if the the location has no symbol.
5878
5879 2018-06-28  Tom Tromey  <tom@tromey.com>
5880
5881         * NEWS: Mention --enable-codesign.
5882         * silent-rules.mk (ECHO_SIGN): New variable.
5883         * configure.ac: Add --enable-codesign.
5884         * configure: Rebuild.
5885         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5886         (gdb$(EXEEXT)): Optionally invoke codesign.
5887
5888 2018-06-28  Pedro Alves  <palves@redhat.com>
5889
5890         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5891         comments.
5892         (switch_to_thread_no_regs): Adjust comment.
5893         * infcmd.c (stop_pc): Delete.
5894         (post_create_inferior, info_program_command): Replace references
5895         to stop_pc with references to thread_info->suspend.stop_pc.
5896         * inferior.h (stop_pc): Delete declaration.
5897         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5898         (handle_inferior_event_1, handle_signal_stop)
5899         (process_event_stop_test, keep_going_stepped_thread)
5900         (handle_step_into_function, handle_step_into_function_backward)
5901         (print_stop_location): Replace references to stop_pc with
5902         references to thread_info->suspend.stop_pc.
5903         (struct infcall_suspend_state) <stop_pc>: Delete field.
5904         (save_infcall_suspend_state, restore_infcall_suspend_state):
5905         Remove references to inf_stat->stop_pc.
5906         * linux-fork.c (fork_load_infrun_state): Likewise.
5907         * record-btrace.c (record_btrace_set_replay): Likewise.
5908         * record-full.c (record_full_goto_entry): Likewise.
5909         * remote.c (print_one_stopped_thread): Likewise.
5910         * target.c (target_resume): Extend comment.
5911         * thread.c (set_executing_thread): New.
5912         (set_executing): Use it.
5913         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5914         Remove references to stop_pc.
5915
5916 2018-06-28  Pedro Alves  <palves@redhat.com>
5917
5918         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5919         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5920
5921 2018-06-28  Tom Tromey  <tom@tromey.com>
5922
5923         * coffread.c (coff_symfile_finish): Update.
5924         * xcoffread.c (xcoff_symfile_finish): Update.
5925         * elfread.c (elf_symfile_finish): Update.
5926         * symfile.h (dwarf2_free_objfile): Don't declare.
5927         * dwarf2read.c (_initialize_dwarf2_read): Use
5928         register_objfile_data_with_cleanup.
5929         (dwarf2_free_objfile): Now static.  Change signature.
5930
5931 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5932
5933         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5934         option "-o" to add-symbol-file-load to add an offset to each
5935         section's load address.
5936         * symfile.c (set_objfile_default_section_offset): New function.
5937
5938 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5939
5940         * symfile.c (add_symbol_file_command): Make sure that sections
5941         with the same name are sorted in the same order.
5942
5943 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5944
5945         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5946         require the second argument.  If omitted, load sections at the
5947         addresses specified in the file.
5948
5949 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5950
5951         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5952         (_initialize_symfile): Add option "-o" to symbol-file to add an
5953         offset to each section of the symbol file.
5954
5955 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5956
5957         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5958
5959 2018-06-27  Tom Tromey  <tom@tromey.com>
5960
5961         * stack.c (_initialize_stack): Update "func" help text.
5962
5963 2018-06-27  Tom Tromey  <tom@tromey.com>
5964
5965         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5966         std::vector.
5967         (unwind_infopy_str, pyuw_create_unwind_info)
5968         (unwind_infopy_add_saved_register, pyuw_sniffer)
5969         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5970         Update.
5971         (struct saved_reg): Add constructor.
5972         <value>: Now a gdbpy_ref<>.
5973
5974 2018-06-27  Tom Tromey  <tom@tromey.com>
5975
5976         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5977
5978 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5979
5980         * gdb-gdb.py.in: Format using autopep8.
5981
5982 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5983
5984         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5985         (type_lookup_function): Recognize CORE_ADDR values.
5986
5987 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5988
5989         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5990         print tag_name.
5991
5992 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5993
5994         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5995         <__lt__>: Add.
5996
5997 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5998
5999         * gdb-gdb.py: Move to...
6000         * gdb-gdb.py.in: ... here.
6001         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6002         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6003         dependencies.
6004         (distclean): Remove gdb-gdb.py when cleaning.
6005         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6006         * configure: Re-generate.
6007
6008 2018-06-27  Pedro Alves  <palves@redhat.com>
6009
6010         * proc-service.c (get_ps_regcache): New.
6011         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6012         (ps_lsetfpregs): Use it.
6013
6014 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6015
6016         PR gdb/21695
6017         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6018         (dwarf_decode_lines_1): Adjust.
6019
6020 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6021
6022         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6023         override.
6024         <info_proc>: Likewise.
6025
6026 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6027
6028         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6029         to windows_fetch_one_register, and only handle the case of
6030         fetching one register.  Move the code that reloads the context
6031         and iterates over all registers if R is negative to...
6032         (windows_nat_target::fetch_registers): ... here.
6033         (do_windows_store_inferior_registers): Rename to
6034         windows_store_one_register, and only handle the case of storing
6035         one register.  Move the code that handles the case where r is
6036         negative to...
6037         (windows_nat_target::store_registers) ... here.
6038
6039 2018-06-26  Tom Tromey  <tom@tromey.com>
6040
6041         PR rust/22574:
6042         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6043         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6044         Update.
6045         (rust_internal_print_type): Add podata parameter.
6046         (rust_print_type): Update.
6047
6048 2018-06-26  Tom Tromey  <tom@tromey.com>
6049
6050         * typeprint.h (struct print_offset_data) <update, finish,
6051         maybe_print_hole>: New methods.
6052         <indentation>: New constant.
6053         * typeprint.c (print_offset_data::indentation): Define.
6054         (print_offset_data::maybe_print_hole, print_offset_data::update)
6055         (print_offset_data::finish): Move from c-typeprint.c and rename.
6056         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6057         (print_spaces_filtered_with_print_options): Update.
6058         (c_print_type_union_field_offset, maybe_print_hole)
6059         (c_print_type_struct_field_offset): Move to typeprint.c and
6060         rename.
6061         (c_type_print_base_struct_union): Update.
6062
6063 2018-06-25  Pedro Alves  <palves@redhat.com>
6064
6065         * gdbthread.h (thread_info_ref, delete_thread)
6066         (delete_thread_silent, first_thread_of_inferior)
6067         (any_thread_of_inferior, switch_to_thread)
6068         (enable_thread_stack_temporaries)
6069         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6070         (get_last_thread_stack_temporary)
6071         (value_in_thread_stack_temporaries, can_access_registers_thread):
6072         Spell out "struct thread_info" instead of just "thread_info".
6073         * inferior.h (notice_new_inferior): Likewise.
6074
6075 2018-06-25  Pedro Alves  <palves@redhat.com>
6076
6077         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6078         pass thread_info pointer to delete_thread.
6079         (windows_nat_target::detach): Pass inferior pointer to
6080         detach_inferior.
6081         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6082         delete_thread.
6083         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6084         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6085         and pass a thread_info pointer to delete_thread.
6086         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6087         pass thread_info pointer to delete_thread.
6088         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6089         delete_thread_silent call.
6090         * procfs.c (procfs_target::detach): Pass inferior pointer to
6091         detach_inferior.
6092         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6093         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6094         delete_thread_silent call.
6095         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6096         pass thread_info pointer to delete_thread.
6097         (windows_nat_target::detach): Pass inferior pointer to
6098         delete_inferior.
6099
6100 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6101
6102         * regcache.c (readable_regcache::read_part): Fix asserts.
6103         (reg_buffer::raw_collect_part): New function.
6104         (regcache::write_part): Fix asserts.
6105         (reg_buffer::raw_supply_part): New function.
6106         (regcache::transfer_regset_register): New helper function.
6107         (regcache::transfer_regset): Call new functions.
6108         (regcache_supply_regset): Use gdb_byte*.
6109         (regcache::supply_regset): Likewise.
6110         (regcache_collect_regset): Likewise.
6111         (regcache::collect_regset): Likewise.
6112         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6113         (reg_buffer::raw_supply_part): Likewise.
6114         (regcache::transfer_regset_register): Likewise.
6115         (regcache::transfer_regset): Use gdb_byte*.
6116
6117 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6118
6119         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6120
6121 2018-06-21  Pedro Alves  <palves@redhat.com>
6122
6123         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6124         instead of a ptid_t.  All callers adjusted.
6125         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6126         adjusted.
6127         (print_ada_task_info, display_current_task_id, task_command_1):
6128         Adjust.
6129         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6130         inferior_thread.
6131         (breakpoint_kind): Adjust.
6132         (remove_breakpoints_pid): Rename to ...
6133         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6134         pointer.  All callers adjusted.
6135         (bpstat_clear_actions): Use inferior_thread.
6136         (get_bpstat_thread): New.
6137         (bpstat_do_actions): Use it.
6138         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6139         to take a thread_info pointer.  All callers adjusted.
6140         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6141         (breakpoint_re_set_thread): Use inferior_thread.
6142         * breakpoint.h (struct inferior): Forward declare.
6143         (bpstat_stop_status): Update.
6144         (remove_breakpoints_pid): Delete.
6145         (remove_breakpoints_inf): New.
6146         * bsd-uthread.c (bsd_uthread_target::wait)
6147         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6148         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6149         (maint_btrace_packet_history_cmd)
6150         (maint_btrace_clear_packet_history_cmd): Adjust.
6151         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6152         inferior_thread.
6153         * cli/cli-interp.c: Include "inferior.h".
6154         * common/refcounted-object.h (struct
6155         refcounted_object_ref_policy): New.
6156         * compile/compile-object-load.c: Include gdbthread.h.
6157         (store_regs): Use inferior_thread.
6158         * corelow.c (core_target::close): Use current_inferior.
6159         (core_target_open): Adjust to use first_thread_of_inferior and use
6160         the current inferior.
6161         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6162         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6163         <thread>: ... this new field.  All references adjusted.
6164         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6165         Take a thread_info pointer instead of a ptid_t.
6166         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6167         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6168         thread_info pointer instead of a ptid_t.
6169         * elfread.c: Include "inferior.h".
6170         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6171         Use inferior_thread.
6172         * eval.c (evaluate_subexp): Likewise.
6173         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6174         inferior_thread.
6175         * gdb_proc_service.h (struct thread_info): Forward declare.
6176         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6177         <thread>: ... this new field.  All references adjusted.
6178         * gdbarch.h, gdbarch.c: Regenerate.
6179         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6180         'thread' parameter.  All implementations and callers adjusted.
6181         * gdbthread.h (thread_info) <set_running>: New method.
6182         (delete_thread, delete_thread_silent): Take a thread_info pointer
6183         instead of a ptid.
6184         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6185         (first_thread_of_process): Delete, replaced by ...
6186         (first_thread_of_inferior): ... this new function.  All callers
6187         adjusted.
6188         (any_live_thread_of_process): Delete, replaced by ...
6189         (any_live_thread_of_inferior): ... this new function.  All callers
6190         adjusted.
6191         (switch_to_thread, switch_to_no_thread): Declare.
6192         (is_executing): Delete.
6193         (enable_thread_stack_temporaries): Update comment.
6194         <enable_thread_stack_temporaries>: Take a thread_info pointer
6195         instead of a ptid_t.  Incref the thread.
6196         <~enable_thread_stack_temporaries>: Decref the thread.
6197         <m_ptid>: Delete
6198         <m_thr>: New.
6199         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6200         (get_last_thread_stack_temporary)
6201         (value_in_thread_stack_temporaries, can_access_registers_thread):
6202         Take a thread_info pointer instead of a ptid_t.  All callers
6203         adjusted.
6204         * infcall.c (get_call_return_value): Use inferior_thread.
6205         (run_inferior_call): Work with thread pointers instead of ptid_t.
6206         (call_function_by_hand_dummy): Work with thread pointers instead
6207         of ptid_t.  Use thread_info_ref.
6208         * infcmd.c (proceed_thread_callback): Access thread's state
6209         directly.
6210         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6211         access thread's state directly.
6212         (continue_command): Use inferior_thread.
6213         (info_program_command): Use find_thread_ptid and access thread
6214         state directly.
6215         (proceed_after_attach_callback): Use thread state directly.
6216         (notice_new_inferior): Take a thread_info pointer instead of a
6217         ptid_t.  All callers adjusted.
6218         (exit_inferior): Take an inferior pointer instead of a pid.  All
6219         callers adjusted.
6220         (exit_inferior_silent): New.
6221         (detach_inferior): Delete.
6222         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6223         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6224         (detach_inferior_command, kill_inferior_command): Use
6225         find_inferior_id instead of valid_gdb_inferior_id and
6226         gdb_inferior_id_to_pid.
6227         (inferior_command): Use inferior and thread pointers.
6228         * inferior.h (struct thread_info): Forward declare.
6229         (notice_new_inferior): Take a thread_info pointer instead of a
6230         ptid_t.  All callers adjusted.
6231         (detach_inferior): Delete declaration.
6232         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6233         instead of a pid.  All callers adjusted.
6234         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6235         (valid_gdb_inferior_id): Delete.
6236         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6237         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6238         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6239         ...
6240         <inf>: ... this new field.
6241         <step_ptid>: Delete, replaced by ...
6242         <step_thread>: ... this new field.
6243         (get_displaced_stepping_state): Take an inferior pointer instead
6244         of a pid.  All callers adjusted.
6245         (displaced_step_in_progress_any_inferior): Adjust.
6246         (displaced_step_in_progress_thread): Take a thread pointer instead
6247         of a ptid_t.  All callers adjusted.
6248         (displaced_step_in_progress, add_displaced_stepping_state): Take
6249         an inferior pointer instead of a pid.  All callers adjusted.
6250         (get_displaced_step_closure_by_addr): Adjust.
6251         (remove_displaced_stepping_state): Take an inferior pointer
6252         instead of a pid.  All callers adjusted.
6253         (displaced_step_prepare_throw, displaced_step_prepare)
6254         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6255         All callers adjusted.
6256         (start_step_over): Adjust.
6257         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6258         displaced step queue.
6259         (do_target_resume): Adjust.
6260         (fetch_inferior_event): Use inferior_thread.
6261         (context_switch, get_inferior_stop_soon): Take an
6262         execution_control_state pointer instead of a ptid_t.  All callers
6263         adjusted.
6264         (switch_to_thread_cleanup): Delete.
6265         (stop_all_threads): Use scoped_restore_current_thread.
6266         * inline-frame.c: Include "gdbthread.h".
6267         (inline_state) <inline_state>: Take a thread pointer instead of a
6268         ptid_t.  All callers adjusted.
6269         <ptid>: Delete, replaced by ...
6270         <thread>: ... this new field.
6271         (find_inline_frame_state): Take a thread pointer instead of a
6272         ptid_t.  All callers adjusted.
6273         (skip_inline_frames, step_into_inline_frame)
6274         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6275         pointer instead of a ptid_t.  All callers adjusted.
6276         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6277         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6278         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6279         pointers directly.
6280         * linux-nat.c (get_detach_signal): Likewise.
6281         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6282         (thread_db_notice_clone): Adjust.
6283         (thread_db_find_new_threads_silently)
6284         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6285         a thread pointer instead of a ptid_t.  All callers adjusted.
6286         * mi/mi-cmd-var.c: Include "inferior.h".
6287         (mi_cmd_var_update_iter): Update to use thread pointers.
6288         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6289         inferior directly.
6290         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6291         out to ...
6292         (mi_output_running): ... this new function.
6293         (mi_on_resume_1): Adjust to use it.
6294         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6295         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6296         directly.
6297         (interrupt_thread_callback): : Adjust to use thread and inferior
6298         pointers.
6299         * proc-service.c: Include "gdbthread.h".
6300         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6301         * progspace-and-thread.c: Include "inferior.h".
6302         * progspace.c: Include "inferior.h".
6303         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6304         hold a reference to an inferior_object.
6305         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6306         inferior_thread.
6307         * python/py-inferior.c (struct inferior_object): Give the type a
6308         tag name instead of a typedef.
6309         (python_on_normal_stop): No need to check if the current thread is
6310         listed.
6311         (inferior_to_inferior_object): Change return type to
6312         inferior_object.  All callers adjusted.
6313         (find_thread_object): Delete, bits factored out to ...
6314         (thread_to_thread_object): ... this new function.
6315         * python/py-infthread.c (create_thread_object): Use
6316         inferior_to_inferior_object.
6317         (thpy_is_stopped): Use thread pointer directly.
6318         (gdbpy_selected_thread): Use inferior_thread.
6319         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6320         field, replaced with ...
6321         <thread>: ... this new field.  All users adjusted.
6322         (btpy_insn_or_gap_new): Drop const.
6323         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6324         callers adjusted.
6325         * python/py-record.c: Include "gdbthread.h".
6326         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6327         a ptid_t.  All callers adjusted.
6328         (gdbpy_current_recording): Use inferior_thread.
6329         * python/py-record.h (recpy_record_object) <ptid>: Delete
6330         field, replaced with ...
6331         <thread>: ... this new field.  All users adjusted.
6332         (recpy_element_object) <ptid>: Delete
6333         field, replaced with ...
6334         <thread>: ... this new field.  All users adjusted.
6335         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6336         a ptid_t.  All callers adjusted.
6337         * python/py-threadevent.c: Include "gdbthread.h".
6338         (get_event_thread): Use thread_to_thread_object.
6339         * python/python-internal.h (struct inferior_object): Forward
6340         declare.
6341         (find_thread_object, find_inferior_object): Delete declarations.
6342         (thread_to_thread_object, inferior_to_inferior_object): New
6343         declarations.
6344         * record-btrace.c: Include "inferior.h".
6345         (require_btrace_thread): Use inferior_thread.
6346         (record_btrace_frame_sniffer)
6347         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6348         (get_thread_current_frame): Use scoped_restore_current_thread and
6349         switch_to_thread.
6350         (get_thread_current_frame): Use thread pointer directly.
6351         (record_btrace_replay_at_breakpoint): Use thread's inferior
6352         pointer directly.
6353         * record-full.c: Include "inferior.h".
6354         * regcache.c: Include "gdbthread.h".
6355         (get_thread_arch_regcache): Use the inferior's address space
6356         directly.
6357         (get_thread_regcache, registers_changed_thread): New.
6358         * regcache.h (get_thread_regcache(thread_info *thread)): New
6359         overload.
6360         (registers_changed_thread): New.
6361         (remote_target) <remote_detach_1>: Swap order of parameters.
6362         (remote_add_thread): <remote_add_thread>: Return the new thread.
6363         (get_remote_thread_info(ptid_t)): New overload.
6364         (remote_target::remote_notice_new_inferior): Use thread pointers
6365         directly.
6366         (remote_target::process_initial_stop_replies): Use
6367         thread_info::set_running.
6368         (remote_target::remote_detach_1, remote_target::detach)
6369         (extended_remote_target::detach): Adjust.
6370         * stack.c (frame_show_address): Use inferior_thread.
6371         * target-debug.h (target_debug_print_thread_info_pp): New.
6372         * target-delegates.c: Regenerate.
6373         * target.c (default_thread_address_space): Delete.
6374         (memory_xfer_partial_1): Use current_inferior.
6375         (target_detach): Use current_inferior.
6376         (target_thread_address_space): Delete.
6377         (generic_mourn_inferior): Use current_inferior.
6378         * target.h (struct target_ops) <thread_address_space>: Delete.
6379         (target_thread_address_space): Delete.
6380         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6381         pointers directly.
6382         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6383         thread pointer instead of a ptid_t.  Adjust all callers.
6384         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6385         (first_thread_of_process): Delete, replaced by ...
6386         (first_thread_of_inferior): ... this new function.  All callers
6387         adjusted.
6388         (any_thread_of_process): Rename to ...
6389         (any_thread_of_inferior): ... this, and take an inferior pointer.
6390         (any_live_thread_of_process): Rename to ...
6391         (any_live_thread_of_inferior): ... this, and take an inferior
6392         pointer.
6393         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6394         (value_in_thread_stack_temporaries)
6395         (get_last_thread_stack_temporary): Take a thread pointer instead
6396         of a ptid_t.  Adjust all callers.
6397         (thread_info::set_running): New.
6398         (validate_registers_access): Use inferior_thread.
6399         (can_access_registers_ptid): Rename to ...
6400         (can_access_registers_thread): ... this, and take a thread
6401         pointer.
6402         (print_thread_info_1): Adjust to compare thread pointers instead
6403         of ptids.
6404         (switch_to_no_thread, switch_to_thread): Make extern.
6405         (scoped_restore_current_thread::~scoped_restore_current_thread):
6406         Use m_thread pointer directly.
6407         (scoped_restore_current_thread::scoped_restore_current_thread):
6408         Use inferior_thread.
6409         (thread_command): Use thread pointer directly.
6410         (thread_num_make_value_helper): Use inferior_thread.
6411         * top.c (execute_command): Use inferior_thread.
6412         * tui/tui-interp.c: Include "inferior.h".
6413         * varobj.c (varobj_create): Use inferior_thread.
6414         (value_of_root_1): Use find_thread_global_id instead of
6415         global_thread_id_to_ptid.
6416
6417 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6418
6419         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6420         possible.
6421         (regcache::write_part): Likewise.
6422         (readable_regcache::cooked_read_part): Update comment.
6423         (readable_regcache::cooked_write_part): Likewise.
6424         * regcache.h: (readable_regcache::read_part): Likewise.
6425         (regcache::write_part): Likewise.
6426
6427 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6428             Dirk Schubert  <dirk.schubert@arm.com>
6429
6430         * aarch64-linux-nat.c (post_attach): New.
6431         (aarch64_linux_nat_target::post_attach): Override post_attach to
6432         record the number of hardware debug registers.
6433
6434 2018-06-20  Tom Tromey  <tom@tromey.com>
6435
6436         * python/py-param.c (add_setshow_generic): Make parameters const.
6437         (parmpy_init): Update.
6438
6439 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6440
6441         * regcache.h (regcache_cooked_read_ftype): Rename to...
6442         (register_read_ftype): ...this, change type to function_view.
6443         (class reg_buffer) <save>: Remove src parameter.
6444         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6445         parameter non-const in first overload.  Remove src parameter in
6446         second overload.
6447         * regcache.c (do_cooked_read): Remove.
6448         (readonly_detached_regcache::readonly_detached_regcache): Make
6449         parameter non-const, adjust call to other constructor.
6450         (reg_buffer::save): Remove src parameter.
6451         * frame.c (do_frame_register_read): Remove.
6452         (frame_save_as_regcache): Use lambda function.
6453         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6454         parameter to ppu2spu_data *.
6455         (ppu2spu_sniffer): Use lambda function.
6456
6457 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6458
6459         * record-full.c (record_full_target::insert_breakpoint): Remove
6460         "struct" keyword, add const.
6461
6462 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6463
6464         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6465         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6466         * configure.ac: Remove AC_PREREQ, add missing quoting.
6467         * gnulib/configure.ac: Modernize usage of
6468         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6469         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6470         (AUTOMAKE_VERSION): Bump to 1.15.1.
6471         * configure: Re-generate.
6472         * config.in: Re-generate.
6473         * aclocal.m4: Re-generate.
6474         * gnulib/aclocal.m4: Re-generate.
6475         * gnulib/config.in: Re-generate.
6476         * gnulib/configure: Re-generate.
6477         * gnulib/import/Makefile.in: Re-generate.
6478
6479 2018-06-19  Pedro Alves  <palves@redhat.com>
6480
6481         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6482         (lookup_minimal_symbol_by_pc_section): ... here with
6483         gdb_assert_not_reached added.
6484
6485 2018-06-19  Pedro Alves  <palves@redhat.com>
6486
6487         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6488         parameter with a block parameter.  Compare location's block symbol
6489         with the frame's block instead of addresses.
6490         (skip_inline_frames): Pass the current block instead of the
6491         frame's address.  Break out as soon as we determine the frame
6492         should not be skipped.
6493
6494 2018-06-18  Tom Tromey  <tom@tromey.com>
6495
6496         * solib-aix.c (solib_aix_get_section_offsets): Return
6497         unique_xmalloc_ptr.
6498         (solib_aix_solib_create_inferior_hook): Update.
6499
6500 2018-06-18  Tom Tromey  <tom@tromey.com>
6501
6502         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6503
6504 2018-06-18  Tom Tromey  <tom@tromey.com>
6505
6506         * solib-frv.c (frv_relocate_main_executable): Use
6507         unique_xmalloc_ptr.
6508         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6509         unique_xmalloc_ptr.
6510
6511 2018-06-18  Tom Tromey  <tom@tromey.com>
6512
6513         * objfiles.h (inhibit_section_map_updates): Update.
6514         (resume_section_map_updates, resume_section_map_updates_cleanup):
6515         Remove.
6516         * solib-svr4.c (svr4_handle_solib_event): Update.
6517         * objfiles.c (inhibit_section_map_updates): Return
6518         scoped_restore_tmpl<int>.
6519         (resume_section_map_updates, resume_section_map_updates_cleanup):
6520         Remove.
6521
6522 2018-06-18  Tom Tromey  <tom@tromey.com>
6523
6524         * valprint.h (read_string): Update.
6525         * valprint.c (read_string): Change type of "buffer".
6526         (val_print_string): Update.
6527         * python/py-value.c (valpy_string): Update.
6528         * language.h (struct language_defn) <la_get_string>: Change
6529         type of "buffer".
6530         (default_get_string, c_get_string): Update.
6531         * language.c (default_get_string): Change type of "buffer".
6532         * guile/scm-value.c (gdbscm_value_to_string): Update.
6533         * c-lang.c (c_get_string): Change type of "buffer".
6534
6535 2018-06-18  Tom Tromey  <tom@tromey.com>
6536
6537         * ser-mingw.c (struct pipe_state_destroyer): New.
6538         (pipe_state_up): New typedef.
6539         (cleanup_pipe_state): Remove.
6540         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6541
6542 2018-06-18  Tom Tromey  <tom@tromey.com>
6543
6544         * rust-lang.h (rust_yyerror): Don't declare.
6545         * rust-lang.c (rust_language_defn): Update.
6546         * rust-exp.y (yyerror): Now static.
6547         * parse.c (parse_exp_in_context_1): Update.
6548         * p-lang.h (p_yyerror): Don't declare.
6549         * p-lang.c (p_language_defn): Update.
6550         * p-exp.y (yyerror): Now static.
6551         * opencl-lang.c (opencl_language_defn): Update.
6552         * objc-lang.c (objc_language_defn): Update.
6553         * m2-lang.h (m2_yyerror): Don't declare.
6554         * m2-lang.c (m2_language_defn): Update.
6555         * m2-exp.y (yyerror): Now static.
6556         * language.h (struct language_defn) <la_error>: Remove.
6557         * language.c (unk_lang_error): Remove.
6558         (unknown_language_defn, auto_language_defn): Remove.
6559         * go-lang.h (go_yyerror): Don't declare.
6560         * go-lang.c (go_language_defn): Update.
6561         * go-exp.y (yyerror): Now static.
6562         * f-lang.h (f_yyerror): Don't declare.
6563         * f-lang.c (f_language_defn): Update.
6564         * f-exp.y (yyerror): Now static.
6565         * d-lang.h (d_yyerror): Don't declare.
6566         * d-lang.c (d_language_defn): Update.
6567         * d-exp.y (yyerror): Now static.
6568         * c-lang.h (c_yyerror): Don't declare.
6569         * c-lang.c (c_language_defn, cplus_language_defn)
6570         (asm_language_defn, minimal_language_defn): Update.
6571         * c-exp.y (yyerror): Now static.
6572         * ada-lang.h (ada_yyerror): Don't declare.
6573         * ada-lang.c (ada_language_defn): Update.
6574         * ada-exp.y (yyerror): Now static.
6575
6576 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6577
6578         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6579         (store_sveregs_to_thread): Likewise.
6580         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6581         (aarch64_linux_store_inferior_registers): Likewise.
6582         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6583         function.
6584         (aarch64_sve_regs_copy_to_regcache): Likewise.
6585         (aarch64_sve_regs_copy_from_regcache): Likewise.
6586         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6587         declaration.
6588         (aarch64_sve_regs_copy_to_regcache): Likewise.
6589         (aarch64_sve_regs_copy_from_regcache): Likewise.
6590         (sve_context): Structure from Linux headers.
6591         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6592         (SVE_SIG_ZREG_SIZE): Likewise.
6593         (SVE_SIG_PREG_SIZE): Likewise.
6594         (SVE_SIG_FFR_SIZE): Likewise.
6595         (SVE_SIG_REGS_OFFSET): Likewise.
6596         (SVE_SIG_ZREGS_OFFSET): Likewise.
6597         (SVE_SIG_ZREG_OFFSET): Likewise.
6598         (SVE_SIG_ZREGS_SIZE): Likewise.
6599         (SVE_SIG_PREGS_OFFSET): Likewise.
6600         (SVE_SIG_PREG_OFFSET): Likewise.
6601         (SVE_SIG_PREGS_SIZE): Likewise.
6602         (SVE_SIG_FFR_OFFSET): Likewise.
6603         (SVE_SIG_REGS_SIZE): Likewise.
6604         (SVE_SIG_CONTEXT_SIZE): Likewise.
6605         (SVE_PT_REGS_MASK): Likewise.
6606         (SVE_PT_REGS_FPSIMD): Likewise.
6607         (SVE_PT_REGS_SVE): Likewise.
6608         (SVE_PT_VL_INHERIT): Likewise.
6609         (SVE_PT_VL_ONEXEC): Likewise.
6610         (SVE_PT_REGS_OFFSET): Likewise.
6611         (SVE_PT_FPSIMD_OFFSET): Likewise.
6612         (SVE_PT_FPSIMD_SIZE): Likewise.
6613         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6614         (SVE_PT_SVE_PREG_SIZE): Likewise.
6615         (SVE_PT_SVE_FFR_SIZE): Likewise.
6616         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6617         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6618         (__SVE_SIG_TO_PT): Likewise.
6619         (SVE_PT_SVE_OFFSET): Likewise.
6620         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6621         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6622         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6623         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6624         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6625         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6626         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6627         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6628         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6629         (SVE_PT_SVE_SIZE): Likewise.
6630         (SVE_PT_SIZE): Likewise.
6631         (HAS_SVE_STATE): New define.
6632
6633 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6634
6635         * nat/aarch64-sve-linux-sigcontext.h: New file.
6636         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6637         new files.
6638         (SVE_VQ_MIN): Likewise.
6639         (SVE_VQ_MAX): Likewise.
6640         (SVE_VL_MIN): Likewise.
6641         (SVE_VL_MAX): Likewise.
6642         (SVE_NUM_ZREGS): Likewise.
6643         (SVE_NUM_PREGS): Likewise.
6644         (sve_vl_valid): Likewise.
6645         (struct user_sve_header): Likewise.
6646
6647 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6648             Richard Bunt <Richard.Bunt@arm.com>
6649
6650         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6651         was requested by GDB.
6652
6653 2018-06-15  Tom de Vries  <tdevries@suse.de>
6654
6655         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6656
6657 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6658
6659         * gnulib/update-gnulib.sh: Print expected versions of
6660         autoconf/aclocal.
6661
6662 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6663
6664         * arch-utils.c (default_type_align): Use type_length_units.
6665         * gdbtypes.c (type_align): Use type_length_units.
6666
6667 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6668
6669         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6670         of 'define' command.
6671
6672 2018-06-14  Tom de Vries  <tdevries@suse.de>
6673
6674         PR cli/22573
6675         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6676         get_no_prettyformat_print_options.
6677
6678 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6679
6680         * sparc-nat.h: Include target.h.
6681         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6682         <fetch_registers>: Remove this argument in function call.
6683         <store_registers>: Remove this argument in function call, remove
6684         extra semicolon.
6685         <low_forget_process>: Call sparc64_forget_process instead of
6686         sparc_forget_process.
6687
6688 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6689
6690         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6691         (procfs_target::make_corefile_notes): Adjust to new
6692         target_read_alloc return type.
6693
6694 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6695             Stephen Roberts  <stephen.roberts@arm.com>
6696
6697         PR gdb/22882
6698         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6699         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6700         Move should_notify_stop local into more inner scope.
6701
6702 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6703             Stephen Roberts  <stephen.roberts@arm.com>
6704
6705         PR gdb/22882
6706         * infrun.c (resume_1): Add call to mark_async_event_handler.
6707
6708 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6709
6710         * infrun.c (do_target_wait): Change old version of $pc printed.
6711
6712 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6713
6714         * dwarf2read.c (read_index_from_section): Rename to...
6715         (read_gdb_index_from_section): ... this, update all callers.
6716         (dwarf2_read_index): Rename to...
6717         (dwarf2_read_gdb_index): ... this, update all callers.
6718
6719 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6720
6721         * gdb/hppa-linux-nat.c
6722         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6723         hppa_linux_nat_target::fetch_registers.
6724
6725 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6726
6727         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6728         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6729         (AARCH64_DWARF_SVE_FFR): Likewise.
6730         (AARCH64_DWARF_SVE_P0): Likewise.
6731         (AARCH64_DWARF_SVE_Z0): Likewise.
6732
6733 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6734
6735         * common/common-regcache.h (raw_compare): New function.
6736         * regcache.c (regcache::raw_compare): Likewise.
6737         * regcache.h (regcache::raw_compare): New declaration.
6738
6739 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6740
6741         * common/common-regcache.h (reg_buffer_common): New structure.
6742         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6743         (reg_buffer::raw_supply): Likewise.
6744         (reg_buffer::raw_supply_integer): Likewise.
6745         (reg_buffer::raw_supply_zeroed): Likewise.
6746         (reg_buffer::raw_collect): Likewise.
6747         (reg_buffer::raw_collect_integer): Likewise.
6748         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6749         (reg_buffer::raw_supply): Likewise.
6750         (reg_buffer::raw_supply_integer): Likewise.
6751         (reg_buffer::raw_supply_zeroed): Likewise.
6752         (reg_buffer::raw_collect): Likewise.
6753         (reg_buffer::raw_collect_integer): Likewise.
6754
6755 2018-06-10  Tom Tromey  <tom@tromey.com>
6756
6757         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6758         (class remote_state) <stop_reply_queue>: Now std::vector.
6759         (remote_state::~remote_state)
6760         (remote_target::stop_reply_queue_length): Update.
6761         (struct queue_iter_param, remove_child_of_pending_fork)
6762         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6763         (check_pending_event_prevents_wildcard_vcont_callback)
6764         (remove_stop_reply_for_inferior)
6765         (remove_stop_reply_of_remote_state)
6766         (remote_notif_remove_once_on_match)
6767         (stop_reply_match_ptid_and_ws)
6768         (remote_kill_child_of_pending_fork): Remove.
6769         (remote_target::remove_new_fork_children)
6770         (remote_target::check_pending_events_prevent_wildcard_vcont)
6771         (remote_target::discard_pending_stop_replies)
6772         (remote_target::discard_pending_stop_replies_in_queue)
6773         (remote_target::remote_notif_remove_queued_reply)
6774         (remote_target::queued_stop_reply)
6775         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6776         (remote_target::wait, remote_target::kill_new_fork_children)
6777         (remote_target::async): Update.
6778
6779 2018-06-10  Tom Tromey  <tom@tromey.com>
6780
6781         * record-full.c (record_full_arch_list_cleanups): Remove.
6782         (record_full_message): Use try/catch.
6783         (record_full_wait_cleanups): Remove.
6784         (record_full_wait_1): Use try/catch.
6785         (record_full_restore): Likewise.
6786
6787 2018-06-10  Tom Tromey  <tom@tromey.com>
6788
6789         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6790         declare VEC.  Add constructor.
6791         <in_target_beneath>: Now bool.
6792         (record_full_breakpoints): Now a std::vector, static.
6793         (record_full_sync_record_breakpoints)
6794         (record_full_init_record_breakpoints)
6795         (record_full_target::insert_breakpoint)
6796         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6797
6798 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6799
6800         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6801         * serial.c (serial_interface_lookup): Remove struct keyword.
6802
6803 2018-06-10  Tom Tromey  <tom@tromey.com>
6804
6805         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6806         method.
6807         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6808         a method.
6809         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6810         method.
6811         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6812         "beneath" as a method.
6813         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6814         Use "beneath" as a method.
6815
6816 2018-06-10  Tom Tromey  <tom@tromey.com>
6817
6818         * tracefile.c (struct trace_file_writer_deleter): New.
6819         <operator()>: Rename from trace_file_writer_xfree.
6820         (trace_file_writer_up): New typedef.
6821         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6822
6823 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6824
6825         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6826         <m_registers, m_register_status>: Change type to
6827         std::unique_ptr.
6828         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6829         XCNEWVEC.
6830
6831 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6832
6833         * common/common-regcache.h (enum register_status): Add
6834         underlying type "signed char".
6835         * regcache.h (reg_buffer) <m_register_status>: Change type to
6836         register_status *.
6837         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6838         register_status instead of signed char.
6839         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6840         (reg_buffer::get_register_status): Remove cast.
6841         (readable_regcache::raw_read): Remove cast.
6842         (readable_regcache::cooked_read): Remove cast.
6843
6844 2018-06-09  Tom Tromey  <tom@tromey.com>
6845
6846         * source.c (reverse_search_command, forward_search_command): Use
6847         scoped_fd.
6848
6849 2018-06-09  Tom Tromey  <tom@tromey.com>
6850
6851         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6852         (serial_ops_list): Now static, std::vector.
6853         (serial_interface_lookup, serial_add_interface): Update.
6854
6855 2018-06-09  Tom Tromey  <tom@tromey.com>
6856
6857         * dwarf2read.c (process_cu_includes): Update.
6858         (process_full_comp_unit): Update.
6859         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6860         std::vector.
6861
6862 2018-06-08  Paul Koning  <paul_koning@dell.com>
6863
6864         PR gdb/23252
6865
6866         * python/python.c (do_start_initialization):
6867         Avoid call to internal Python API.
6868         (init__gdb_module): New function.
6869
6870 2018-06-08  Gary Benson <gbenson@redhat.com>
6871
6872         * linux-thread-db.c (valprint.h): New include.
6873         (struct check_thread_db_info): New structure.
6874         (check_thread_db_on_load, tdb_testinfo): New static globals.
6875         (check_thread_db, check_thread_db_callback): New functions.
6876         (try_thread_db_load_1): Run integrity checks if requested.
6877         (maintenance_check_libthread_db): New function.
6878         (_initialize_thread_db): Register "maint check libthread-db"
6879         and "maint set/show check-libthread-db".
6880         * NEWS: Mention the above new commands.
6881
6882 2018-06-08  Tom Tromey  <tom@tromey.com>
6883
6884         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6885         now a method.
6886
6887 2018-06-08  Tom Tromey  <tom@tromey.com>
6888
6889         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6890
6891 2018-06-08  Tom Tromey  <tom@tromey.com>
6892
6893         * common/btrace-common.h (struct btrace_data): Add constructor,
6894         destructor, move assignment operator.
6895         <empty, clear, fini>: New methods.
6896         <format>: Initialize.
6897         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6898         (btrace_data_empty): Don't declare.
6899         * common/btrace-common.c (btrace_data_init): Remove.
6900         (btrace_data::fini): Rename from btrace_data_fini.
6901         (btrace_data::empty): Rename from btrace_data_empty.
6902         (btrace_data::clear): Rename from btrace_data_clear.  Return
6903         bool.
6904         * btrace.h (make_cleanup_btrace_data): Don't declare.
6905         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6906         (parse_xml_btrace): Update.
6907         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6908         (maint_btrace_clear_packet_history_cmd): Update.
6909
6910 2018-06-07  Pedro Alves  <palves@redhat.com>
6911
6912         * target.h (target_ops) <beneath>: Now a method.  All references
6913         updated.
6914         (class target_stack): New.
6915         * target.c (g_target_stack): New.
6916         (g_current_top_target): Delete.
6917         (current_top_target): Get the top target out of g_target_stack.
6918         (target_stack::push, target_stack::unpush): New.
6919         (push_target, unpush_target): Reimplement.
6920         (target_is_pushed): Reimplement in terms of g_target_stack.
6921         (target_ops::beneath, target_stack::find_beneath): New.
6922
6923 2018-06-07  Pedro Alves  <palves@redhat.com>
6924
6925         * target.h (find_target_beneath): Delete declaration.
6926         * target.c (find_target_beneath): Delete definition.
6927         * aix-thread.c: All callers of find_target_beneath adjusted to
6928         call target_ops::beneath instead.
6929         * bsd-uthread.c: Likewise.
6930         * linux-thread-db.c: Likewise.
6931         * ravenscar-thread.c: Likewise.
6932         * sol-thread.c: Likewise.
6933         * spu-multiarch.c: Likewise.
6934
6935 2018-06-07  Pedro Alves  <palves@redhat.com>
6936
6937         * target.h (target_ops) <beneath>: Now a method.  All references
6938         updated.
6939         (target_ops) <m_beneath>: New.
6940         * target.c (target_ops::beneath): New.
6941         * corelow.c: Adjust all references to target_ops::beneath.
6942         * linux-thread-db.c: Likewise.
6943         * make-target-delegates: Likewise.
6944         * record-btrace.c: Likewise.
6945         * record-full.c: Likewise.
6946         * remote.c: Likewise.
6947         * target.c: Likewise.
6948         * target-delegates.c: Regenerate.
6949
6950 2018-06-07  Pedro Alves  <palves@redhat.com>
6951
6952         * target.h (target_stack): Delete.
6953         (current_top_target): Declare function.
6954         * target.c (target_stack): Delete.
6955         (g_current_top_target): New.
6956         (current_top_target): New function.
6957         * auxv.c: Use current_top_target instead of target_stack
6958         throughout.
6959         * avr-tdep.c: Likewise.
6960         * breakpoint.c: Likewise.
6961         * corefile.c: Likewise.
6962         * elfread.c: Likewise.
6963         * eval.c: Likewise.
6964         * exceptions.c: Likewise.
6965         * frame.c: Likewise.
6966         * gdbarch-selftests.c: Likewise.
6967         * gnu-v3-abi.c: Likewise.
6968         * ia64-tdep.c: Likewise.
6969         * ia64-vms-tdep.c: Likewise.
6970         * infcall.c: Likewise.
6971         * infcmd.c: Likewise.
6972         * infrun.c: Likewise.
6973         * linespec.c: Likewise.
6974         * linux-tdep.c: Likewise.
6975         * minsyms.c: Likewise.
6976         * ppc-linux-nat.c: Likewise.
6977         * ppc-linux-tdep.c: Likewise.
6978         * procfs.c: Likewise.
6979         * regcache.c: Likewise.
6980         * remote.c: Likewise.
6981         * rs6000-tdep.c: Likewise.
6982         * s390-linux-nat.c: Likewise.
6983         * s390-tdep.c: Likewise.
6984         * solib-aix.c: Likewise.
6985         * solib-darwin.c: Likewise.
6986         * solib-dsbt.c: Likewise.
6987         * solib-spu.c: Likewise.
6988         * solib-svr4.c: Likewise.
6989         * solib-target.c: Likewise.
6990         * sparc-tdep.c: Likewise.
6991         * sparc64-tdep.c: Likewise.
6992         * spu-tdep.c: Likewise.
6993         * symfile.c: Likewise.
6994         * symtab.c: Likewise.
6995         * target-descriptions.c: Likewise.
6996         * target-memory.c: Likewise.
6997         * target.c: Likewise.
6998         * target.h: Likewise.
6999         * tracefile-tfile.c: Likewise.
7000         * tracepoint.c: Likewise.
7001         * valops.c: Likewise.
7002         * valprint.c: Likewise.
7003         * value.c: Likewise.
7004         * windows-tdep.c: Likewise.
7005         * mi/mi-main.c: Likewise.
7006
7007 2018-06-07  Tom Tromey  <tom@tromey.com>
7008
7009         * valprint.h (build_address_symbolic): Declare.
7010         * printcmd.c (print_address_symbolic): Update.
7011         (build_address_symbolic): Change "name" and "filename" to
7012         std::string.
7013         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7014         Update.
7015         * defs.h (build_address_symbolic): Remove declaration.
7016
7017 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7018
7019         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7020         (aarch64_vnv_type): Add function.
7021         (aarch64_pseudo_register_name): Add V regs for SVE.
7022         (aarch64_pseudo_register_type): Likewise.
7023         (aarch64_pseudo_register_reggroup_p): Likewise.
7024         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7025         (aarch64_pseudo_read_value): Add V regs for SVE.
7026         (aarch64_pseudo_write_2): Use V0 offset for SVE
7027         (aarch64_pseudo_write): Add V regs for SVE.
7028         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7029
7030 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7031
7032         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7033         (sve_vl_from_vq): Likewise.
7034
7035 2018-06-05  Tom Tromey  <tom@tromey.com>
7036
7037         * cli/cli-cmds.c (show_version): Update.
7038         * top.c (print_gdb_version): Add "interactive" parameter.
7039         Update.
7040         * main.c (captured_main_1): Update.
7041         * top.h (print_gdb_version): Add "interactive" parameter and a
7042         comment.
7043
7044 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7045
7046         * common/enum-flags.h: Add trailing semicolon to example in
7047         comment.
7048
7049 2018-06-05  Tom Tromey  <tom@tromey.com>
7050
7051         PR cli/12326:
7052         * NEWS: Add entry about pager.
7053         * utils.c (pagination_disabled_for_command): New global.
7054         (prompt_for_continue): Allow "c" response to prompt.
7055         (reinitialize_more_filter): Clear
7056         pagination_disabled_for_command.
7057         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7058
7059 2018-06-04  Tom Tromey  <tom@tromey.com>
7060
7061         * ada-lang.h (ada_lookup_symbol_list): Update.
7062         * ada-lang.c (resolve_subexp): Update.
7063         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7064         parameter.
7065         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7066         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7067         results parameter to std::vector.
7068         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7069         Update.
7070         * ada-exp.y (block_lookup): Update.
7071         (select_possible_type_sym): Change type of syms.  Remove nsyms
7072         parameter.
7073         (write_var_or_type, write_name_assoc): Update.
7074
7075 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7076
7077         * windows-nat.c (windows_nat_target::xfer_partial): Return
7078         TARGET_XFER_E_IO if we need to delegate to the target beneath
7079         but BENEATH is NULL.
7080
7081 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7082
7083         * Makefile.in (config.status): Add configure.nat as a
7084         dependency.
7085
7086 2018-06-04  Tom Tromey  <tom@tromey.com>
7087
7088         * cp-name-parser.y (cpname_state): Add method declarations.
7089         (HANDLE_QUAL): Update.
7090         (cpname_state::d_grab, cpname_state::fill_comp)
7091         (cpname_state::make_operator, cpname_state::make_dtor)
7092         (cpname_state::make_builtin_type, cpname_state::make_name)
7093         (cpname_state::d_qualify, cpname_state::d_int_type)
7094         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7095         (%union): Move earlier.
7096
7097 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7098
7099         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7100
7101 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7102
7103         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7104         (aarch64_pseudo_write_1): Likewise.
7105         (aarch64_pseudo_read_value): Use helper.
7106         (aarch64_pseudo_write): Likewise.
7107
7108 2018-06-04  Pedro Alves  <palves@redhat.com>
7109
7110         * darwin-nat.c (darwin_ops): Delete.
7111         (darwin_attach_pid): Use get_native_target.
7112
7113 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7114
7115         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7116         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7117
7118 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7119
7120         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7121         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7122         (aarch64_gdbarch_init): Check for SVE.
7123         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7124
7125 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7126
7127         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7128         * aarch64-tdep.h (aarch64_read_description): Likewise.
7129         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7130         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7131         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7132         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7133         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7134
7135 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7136
7137         * value.c (value_fetch_lazy_bitfield): New.
7138         (value_fetch_lazy_memory): New.
7139         (value_fetch_lazy_register): New.
7140         (value_fetch_lazy): Factor out to smaller functions.
7141
7142 2018-06-01  Tom Tromey  <tom@tromey.com>
7143
7144         * cp-name-parser.y (backslashable, represented): Now const.
7145
7146 2018-06-01  Tom Tromey  <tom@tromey.com>
7147
7148         * cp-name-parser.y: Include parser-defs.h.
7149         (parser_fprintf): Remove declaration.
7150
7151 2018-06-01  Tom Tromey  <tom@tromey.com>
7152
7153         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7154         %parse-param.
7155         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7156         (global_result): Remove globals.
7157         (struct cpname_state): New.
7158         (yyparse): Don't declare.
7159         (yylex, yyerror): Move declarations after %union.
7160         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7161         (make_name): Add state parameter.
7162         Update all callers.
7163         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7164         parameter.
7165         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7166         Update.
7167         (yylex): Add lvalp, state parameters.
7168         (yyerror): Add state parameter.
7169         (cp_demangled_name_to_comp): Update.
7170
7171 2018-06-01  Tom Tromey  <tom@tromey.com>
7172
7173         * cp-name-parser.y (parser_fprintf): Declare.
7174         (GDB_YY_REMAP_PREFIX): Define.
7175         Include yy-remap.h.  Don't redefine yy* identifiers.
7176
7177 2018-06-01  Tom Tromey  <tom@tromey.com>
7178
7179         * python/py-type.c (typy_legacy_template_argument): Update.
7180         * cp-support.h (cp_demangled_name_to_comp): Update.
7181         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7182         parameter to be a "std::string *".
7183         (main): Update.
7184
7185 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7186
7187         * ada-lex.l: Include "diagnostics.h" instead of
7188         "common/diagnostics.h".
7189         * unittests/environ-selftests.c: Likewise.
7190         * common/diagnostics.h: Moved to ../include.
7191
7192 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7193
7194         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7195         to language_mode_manual while calling breakpoint_re_set_one.
7196
7197 2018-06-01  Tom Tromey  <tom@tromey.com>
7198
7199         * valops.c (value_cast_structs, destructor_name_p): Update.
7200         * symtab.c (gdb_mangle_name): Update.
7201         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7202         Update.
7203         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7204         (pascal_object_print_value_fields, pascal_object_print_value):
7205         Update.
7206         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7207         * linespec.c (find_methods): Update.
7208         * gdbtypes.h (type_name_no_tag): Remove.
7209         (type_name_or_error): Rename from type_name_no_tag_or_error.
7210         * gdbtypes.c (type_name_no_tag): Remove.
7211         (type_name_or_error): Rename from type_name_no_tag_or_error.
7212         (lookup_struct_elt_type, check_typedef): Update.
7213         * expprint.c (print_subexp_standard): Update.
7214         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7215         * d-namespace.c (d_lookup_nested_symbol): Update.
7216         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7217         (cp_print_class_member): Update.
7218         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7219         * completer.c (add_struct_fields): Update.
7220         * c-typeprint.c (cp_type_print_derivation_info)
7221         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7222         Update.
7223         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7224         (ada_prefer_type, ada_is_exception_sym): Update.
7225
7226 2018-06-01  Tom Tromey  <tom@tromey.com>
7227
7228         * valops.c (enum_constant_from_type, value_namespace_elt)
7229         (value_maybe_namespace_elt): Update.
7230         * valarith.c (find_size_for_pointer_math): Update.
7231         * target-descriptions.c (make_gdb_type): Update.
7232         * symmisc.c (print_symbol): Update.
7233         * stabsread.c (define_symbol, read_type)
7234         (complain_about_struct_wipeout, add_undefined_type)
7235         (cleanup_undefined_types_1): Update.
7236         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7237         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7238         (rust_internal_print_type, rust_composite_type)
7239         (rust_evaluate_funcall, rust_evaluate_subexp)
7240         (rust_inclusive_range_type_p): Update.
7241         * python/py-type.c (typy_get_tag): Update.
7242         * p-typeprint.c (pascal_type_print_base): Update.
7243         * mdebugread.c (parse_symbol, parse_type): Update.
7244         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7245         Update.
7246         * guile/scm-type.c (gdbscm_type_tag): Update.
7247         * go-lang.c (sixg_string_p): Update.
7248         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7249         Update.
7250         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7251         (TYPE_TAG_NAME): Remove.
7252         * gdbtypes.c (type_name_no_tag): Simplify.
7253         (check_typedef, check_types_equal, recursive_dump_type)
7254         (copy_type_recursive, arch_composite_type): Update.
7255         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7256         in summary mode when needed.
7257         * eval.c (evaluate_funcall): Update.
7258         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7259         (process_structure_scope, read_enumeration_type)
7260         (read_namespace_type, read_module_type, determine_prefix): Update.
7261         * cp-support.c (inspect_type): Update.
7262         * coffread.c (process_coff_symbol, decode_base_type): Update.
7263         * c-varobj.c (c_is_path_expr_parent): Update.
7264         * c-typeprint.c (c_type_print_base_struct_union): Update.
7265         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7266         summary when using C language.
7267         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7268         (gen_maybe_namespace_elt): Update.
7269         * ada-lang.c (ada_type_name): Simplify.
7270         (empty_record, ada_template_to_fixed_record_type_1)
7271         (template_to_static_fixed_type)
7272         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7273
7274 2018-06-01  Tom Tromey  <tom@tromey.com>
7275
7276         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7277         c_print_type.
7278         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7279         (c_print_type): Update.
7280         (c_print_type): New overload.
7281         (c_type_print_varspec_prefix, c_type_print_args)
7282         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7283         (c_type_print_base_struct_union, c_type_print_base_1)
7284         (cp_type_print_method_args): Add "language" parameter.
7285         (c_type_print_base): Update.
7286         * c-lang.h (c_print_type): Add new overload.
7287
7288 2018-06-01  Tom Tromey  <tom@tromey.com>
7289
7290         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7291         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7292
7293 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7294
7295         * aarch64-tdep.c (aarch64_sve_register_names): New const
7296         var.
7297         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7298         (AARCH64_SVE_Z_REGS_NUM): New define.
7299         (AARCH64_SVE_P_REGS_NUM): Likewise.
7300         (AARCH64_SVE_NUM_REGS): Likewise.
7301
7302 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7303
7304         * nat/linux-ptrace.h [__alpha__]
7305         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7306         definitions.
7307
7308 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7309
7310         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7311         the endianness selected.
7312         * NEWS: Document `set endian auto' mode operation update.
7313
7314 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7315
7316         * Makefile.in: Add new header.
7317         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7318         (sve_vl_from_vg): Likewise.
7319         (sve_vq_from_vl): Likewise.
7320         (sve_vl_from_vq): Likewise.
7321         (sve_vq_from_vg): Likewise.
7322         (sve_vg_from_vq): Likewise.
7323         * configure.nat: Add new c file.
7324         * nat/aarch64-sve-linux-ptrace.c: New file.
7325         * nat/aarch64-sve-linux-ptrace.h: New file.
7326
7327 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7328
7329         * aarch64-linux-nat.c (aarch64_linux_read_description):
7330         Add parmeter zero.
7331         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7332         Likewise.
7333         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7334         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7335         (aarch64_gdbarch_init): Add parmeter zero.
7336         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7337         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7338         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7339         parmeter.
7340         * doc/gdb.texinfo: Describe SVE feature
7341         * features/aarch64-sve.c: New file.
7342
7343 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7344
7345         PR gdb/23210
7346         * gdbarch.sh (significant_addr_bit): Default to zero when
7347         not set by target architecture.
7348         * gdbarch.c: Re-generated.
7349         * utils.c (address_significant): Update.
7350
7351 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7352
7353         * stack.c (func_command): Remove trailing newline in call to error.
7354
7355 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7356
7357         * regcache.h (regcache_raw_collect): Remove, update callers to
7358         use regcache::raw_collect.
7359         * regcache.c (regcache_raw_collect): Remove.
7360
7361 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7362
7363         * regcache.h (regcache_raw_supply): Remove, update callers to
7364         use detached_regcache::raw_supply.
7365         * regcache.c (regcache_raw_supply): Remove.
7366
7367 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7368
7369         * regcache.h (regcache_cooked_write_part): Remove, update
7370         callers to use regcache::cooked_write_part.
7371         * regcache.c (regcache_cooked_write_part): Remove.
7372
7373 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7374
7375         * regcache.h (regcache_cooked_read_part): Remove, update callers
7376         to use readable_regcache::cooked_read_part.
7377         * regcache.c (regcache_cooked_read_part): Remove.
7378
7379 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7380
7381         * regcache.h (regcache_cooked_read_value): Remove, update
7382         callers to use readable_regcache::cooked_read_value.
7383         * regcache.c (regcache_cooked_read_value): Remove.
7384
7385 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7386
7387         * regcache.h (regcache_cooked_write): Remove, update callers to
7388         use regcache::cooked_write.
7389         * regcache.c (regcache_cooked_write): Remove.
7390
7391 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7392
7393         * regcache.h (regcache_invalidate): Remove, update callers to
7394         use detached_regcache::invalidate instead.
7395         * regcache.c (regcache_invalidate): Remove.
7396
7397 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7398
7399         * regcache.h (regcache_raw_write_part): Remove, update callers
7400         to use regcache::raw_write_part instead.
7401         * regcache.c (regcache_raw_write_part): Remove.
7402
7403 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7404
7405         * regcache.h (regcache_raw_read_part): Remove, update callers to
7406         use readable_regcache::raw_read_part instead.
7407         * regcache.c (regcache_raw_read_part): Remove.
7408
7409 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7410
7411         * regcache.h (regcache_cooked_read): Remove, update callers to
7412         use readable_regcache::cooked_read instead.
7413         * regcache.c (regcache_cooked_read): Remove.
7414
7415 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7416
7417         * regcache.h (regcache_raw_write): Remove, update callers to use
7418         regcache::raw_write instead.
7419         * regcache.c (regcache_raw_write): Remove.
7420
7421 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * regcache.h (regcache_raw_read): Remove, update callers to use
7424         readable_regcache::raw_read instead.
7425         * regcache.c (regcache_raw_read): Remove.
7426
7427 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7428
7429         * regcache.h (regcache_raw_update): Remove, update callers to
7430         use readable_regcache::raw_update instead.
7431         * regcache.c (regcache_raw_update): Remove.
7432
7433 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7434
7435         * regcache.h (regcache_register_status): Remove, update callers
7436         to use reg_buffer::get_register_status directly instead.
7437         * regcache.c (regcache_register_status): Remove.
7438
7439 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7440
7441         * regcache.h (regcache_get_ptid): Remove, update all callers to
7442         call regcache::ptid instead.
7443         * regcache.c (regcache_get_ptid): Remove.
7444
7445 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7446
7447         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7448
7449 2018-05-30  Pedro Alves  <palves@redhat.com>
7450
7451         * common/common-exceptions.h (exception_rethrow): Use
7452         ATTRIBUTE_NORETURN.
7453
7454 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7455
7456         * breakpoint.c (print_solib_event, check_status_catch_solib):
7457         Remove struct keyword in range-based for loops.
7458         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7459         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7460         Likewise.
7461         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7462         Likewise.
7463         * symfile.c (addr_info_make_relative): Likewise.
7464         * thread.c (value_in_thread_stack_temporaries): Likewise.
7465
7466 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7467
7468         PR gdb/16841
7469         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7470         aggregate type to get its real type before accessing it.
7471
7472 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7473
7474         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7475         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7476         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7477         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7478         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7479         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7480         * printcmd.c (info_address_command): Likewise.
7481
7482 2018-05-29  Tom Tromey  <tom@tromey.com>
7483
7484         * windows-nat.c (handle_exception): Update fall-through comment.
7485
7486 2018-05-29  Tom Tromey  <tom@tromey.com>
7487
7488         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7489         (struct program_space) <added_solibs>: Now a std::vector.
7490         * breakpoint.c (print_solib_event): Update.
7491         (check_status_catch_solib): Update.
7492         * progspace.c (clear_program_space_solib_cache): Update.
7493         * solib.c (update_solib_list): Update.
7494
7495 2018-05-29  Tom Tromey  <tom@tromey.com>
7496
7497         * python/py-type.c (typy_richcompare): Update.
7498         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7499         * gdbtypes.h (types_deeply_equal): Return bool.
7500         (types_equal): Likewise.
7501         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7502         declare VEC.
7503         (check_types_equal): Change worklist to std::vector.  Return
7504         bool.
7505         (struct type_equality_entry): Add constructor.
7506         (compare_maybe_null_strings): Return bool.
7507         (check_types_worklist): Return bool.  Change worklist to
7508         std::vector.
7509         (types_deeply_equal): Use std::vector.
7510         (types_equal): Return bool.
7511         (compare_maybe_null_strings): Simplify.
7512
7513 2018-05-29  Tom Tromey  <tom@tromey.com>
7514
7515         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7516
7517 2018-05-29  Tom Tromey  <tom@tromey.com>
7518
7519         * objc-lang.h: Don't include cp-support.h.
7520         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7521         declare VEC.
7522
7523 2018-05-27  Tom Tromey  <tom@tromey.com>
7524
7525         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7526
7527 2018-05-25  Tom Tromey  <tom@tromey.com>
7528
7529         * value.c (value::location): Initialize.
7530
7531 2018-05-25  Tom Tromey  <tom@tromey.com>
7532
7533         * dbxread.c (init_bincl_list): Remove.
7534         (bincl_list): Now a std::vector.
7535         (bincls_allocated, next_bincl): Remove.
7536         (free_bincl_list, do_free_bincl_list_cleanup)
7537         (make_cleanup_free_bincl_list): Remove.
7538         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7539         unique_xmalloc_ptr.
7540         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7541         (struct header_file_location): Add constructor.
7542         (add_bincl_to_list): Remove.
7543
7544 2018-05-25  Tom Tromey  <tom@tromey.com>
7545
7546         * tui/tui.c (tui_enable): Update.
7547         * mi/mi-interp.c (mi_interp::init): Update.
7548         * interps.h (class interp) <name>: New method.
7549         <m_name>: Rename from name.
7550         (~scoped_restore_interp): Update.
7551         * interps.c (interp::interp): Update.
7552         (interp_add, interp_set, interp_lookup_existing)
7553         (current_interp_named_p): Update.
7554
7555 2018-05-25  Tom Tromey  <tom@tromey.com>
7556
7557         * interps.c (interp_name): Remove.
7558         * mi/mi-interp.c (mi_interp::init): Update.
7559         * interps.h (interp_name): Remove.
7560         (~scoped_restore_interp): Update.
7561         * tui/tui.c (tui_enable): Update.
7562
7563 2018-05-25  Tom Tromey  <tom@tromey.com>
7564
7565         * utils.c (fputs_maybe_filtered): Update.
7566         * linespec.c (decode_line_full): Update.
7567         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7568         (mi_print_breakpoint_for_event, mi_solib_loaded)
7569         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7570         (mi_user_selected_context_changed): Update.
7571         * mi/mi-main.c (mi_execute_command): Update.
7572         * cli/cli-script.c (execute_control_command): Update.
7573         * python/python.c (execute_gdb_command): Update.
7574         * solib.c (info_sharedlibrary_command): Update.
7575         * interps.c (interp_ui_out): Remove.
7576         * interps.h (interp_ui_out): Remove.
7577
7578 2018-05-25  Tom Tromey  <tom@tromey.com>
7579
7580         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7581         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7582         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7583
7584 2018-05-25  Tom Tromey  <tom@tromey.com>
7585
7586         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7587         * interps.c (interp_exec): Use scoped_restore.
7588
7589 2018-05-25  Tom Tromey  <tom@tromey.com>
7590
7591         * remote.c (remote_target::remote_file_get): Use
7592         gdb::byte_vector.
7593         (remote_target::remote_file_put): Likewise.
7594
7595 2018-05-25  Tom Tromey  <tom@tromey.com>
7596
7597         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7598         a std::string.
7599         (get_pe_section_index, add_pe_exported_sym): Update.
7600         (read_pe_exported_syms): Use gdb::def_vector.
7601
7602 2018-05-25  Tom Tromey  <tom@tromey.com>
7603
7604         * frame.c (remove_prev_frame): Remove.
7605         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7606
7607 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7608
7609         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7610         Remove prototypes.
7611         * mips-linux-nat.c (supply_fpregset): Always call
7612         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7613         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7614         `mips_fill_fpregset'.
7615         * mips-linux-tdep.c (mips_supply_fpregset)
7616         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7617         (mips_fill_fpregset_wrapper): Remove functions.
7618         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7619         (mips_linux_fpregset): Remove variable.
7620         (mips_linux_iterate_over_regset_sections): Use
7621         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7622         (mips_linux_o32_sigframe_init): Remove comment.
7623
7624 2018-05-25  Pedro Alves  <palves@redhat.com>
7625
7626         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7627         (struct readahead_cache, struct packet_reg, struct
7628         remote_arch_state, class remote_state): Move higher up in the
7629         file.
7630         (remote_target::m_remote_state): Now an object instead of a pointer.
7631         (remote_target::get_remote_state): Adjust.
7632
7633 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7634
7635         * stack.c (select_and_print_frame): Delete.
7636         (struct function_bounds): Move struct within function.
7637         (func_command): Most content moved into new function
7638         find_frame_for_function, use new function, print result, add
7639         function comment.
7640         (find_frame_for_function): New function, now returns a result.
7641
7642 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7643
7644         * stack.c (iterate_over_block_arg_vars): Fix comment.
7645         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7646
7647 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7648
7649         PR gdb/23203
7650         * frame.c
7651         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7652         Define.
7653         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7654         Define.
7655         * frame.h (class scoped_restore_selected_frame): New class.
7656         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7657         of any exception, use scoped_restore_selected_frame to restore the
7658         frame instead.
7659
7660 2018-05-24  Pedro Alves  <palves@redhat.com>
7661
7662         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7663         override.
7664
7665 2018-05-23  Tom Tromey  <tom@tromey.com>
7666
7667         * complaints.c (struct complaints): Remove.
7668         (symfile_complaint_book): Remove.
7669         (series): New global.
7670         (complaint_internal): Update.
7671         (clear_complaints): Update.
7672
7673 2018-05-23  Tom Tromey  <tom@tromey.com>
7674
7675         * complaints.c (counters): New global.
7676         (struct complain): Remove.
7677         (struct complaints) <root>: Remove.
7678         (complaint_sentinel): Remove.
7679         (symfile_complaint_book): Update.
7680         (find_complaint) Remove.
7681         (complaint_internal, clear_complaints): Update.
7682
7683 2018-05-23  Tom Tromey  <tom@tromey.com>
7684
7685         * complaints.c (struct complain) <file, line>: Remove.
7686         (find_complaint): Remove file, line parameters.
7687         (complaint_internal): Update.
7688
7689 2018-05-23  Tom Tromey  <tom@tromey.com>
7690
7691         * complaints.c (vcomplaint): Remove.
7692         (complaint_internal) Merge in contents of vcomplaint.
7693
7694 2018-05-23  Tom Tromey  <tom@tromey.com>
7695
7696         * complaints.c (struct complaints) <explanation>: Remove.
7697         (symfile_explanations): Remove.
7698         (symfile_complaint_book): Update.
7699         (vcomplaint): Update.
7700         (struct explanation): Remove.
7701
7702 2018-05-23  Tom Tromey  <tom@tromey.com>
7703
7704         * complaints.c (symfile_complaints): Remove.
7705         (complaint_internal): Remove "complaints" parameter.
7706         (clear_complaints, vcomplaint): Remove "c" parameter.
7707         (get_complaints): Remove.
7708         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7709         (dwarf2_debug_line_missing_file_complaint)
7710         (dwarf2_debug_line_missing_end_sequence_complaint)
7711         (dwarf2_complex_location_expr_complaint)
7712         (dwarf2_const_value_length_mismatch_complaint)
7713         (dwarf2_section_buffer_overflow_complaint)
7714         (dwarf2_macro_malformed_definition_complaint)
7715         (dwarf2_invalid_attrib_class_complaint)
7716         (create_addrmap_from_index, dw2_symtab_iter_next)
7717         (dw2_expand_marked_cus)
7718         (dw2_debug_names_iterator::find_vec_in_debug_names)
7719         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7720         (create_debug_type_hash_table, init_cutu_and_read_dies)
7721         (partial_die_parent_scope, add_partial_enumeration)
7722         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7723         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7724         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7725         (create_cus_hash_table, create_dwp_hash_table)
7726         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7727         (dwarf2_rnglists_process, dwarf2_ranges_process)
7728         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7729         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7730         (handle_struct_member_die, process_structure_scope)
7731         (read_array_type, read_common_block, read_module_type)
7732         (read_tag_pointer_type, read_typedef, read_base_type)
7733         (read_subrange_type, load_partial_dies, partial_die_info::read)
7734         (partial_die_info::read, partial_die_info::read)
7735         (partial_die_info::read, read_checked_initial_length_and_offset)
7736         (dwarf2_string_attr, read_formatted_entries)
7737         (dwarf_decode_line_header)
7738         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7739         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7740         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7741         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7742         (get_signatured_type, get_DW_AT_signature_type)
7743         (decode_locdesc, file_file_name, consume_improper_spaces)
7744         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7745         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7746         (dwarf2_symbol_mark_computed, set_die_type)
7747         (read_attribute_value): Update.
7748         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7749         Update.
7750         * dbxread.c (unknown_symtype_complaint)
7751         (lbrac_mismatch_complaint, repeated_header_complaint)
7752         (set_namestring, function_outside_compilation_unit_complaint)
7753         (read_dbx_symtab, process_one_symbol): Update.
7754         * gdbtypes.c (stub_noname_complaint): Update.
7755         * windows-nat.c (handle_unload_dll): Update.
7756         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7757         (decode_base_type): Update.
7758         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7759         (eb_complaint, record_include_begin, record_include_end)
7760         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7761         (process_xcoff_symbol, read_symbol)
7762         (function_outside_compilation_unit_complaint)
7763         (scan_xcoff_symtab): Update.
7764         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7765         * buildsym.c (finish_block_internal, make_blockvector)
7766         (end_symtab_get_static_block, augment_type_symtab): Update.
7767         * dtrace-probe.c (dtrace_process_dof)
7768         (dtrace_static_probe_ops::get_probes): Update.
7769         * complaints.h (struct complaint): Don't declare.
7770         (symfile_complaints): Remove.
7771         (complaint_internal): Remove "complaints" parameter.
7772         (complaint): Likewise.
7773         (clear_complaints): Likewise.
7774         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7775         (reread_symbols): Update.
7776         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7777         (dwarf2_frame_cache, decode_frame_entry): Update.
7778         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7779         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7780         (info_selectors_command): Update.
7781         * macrotab.c (macro_include, check_for_redefinition)
7782         (macro_undef): Update.
7783         * objfiles.c (filter_overlapping_sections): Update.
7784         * stabsread.c (invalid_cpp_abbrev_complaint)
7785         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7786         (define_symbol, error_type, read_type, rs6000_builtin_type)
7787         (stabs_method_name_from_physname, read_member_functions)
7788         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7789         (attach_fields_to_type, complain_about_struct_wipeout)
7790         (read_range_type, read_args, common_block_start)
7791         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7792         Update.
7793         * mdebugread.c (index_complaint, unknown_ext_complaint)
7794         (basic_type_complaint, bad_tag_guess_complaint)
7795         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7796         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7797         (parse_procedure, parse_lines)
7798         (function_outside_compilation_unit_complaint)
7799         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7800         (bad_tag_guess_complaint, reg_value_complaint): Update.
7801         * cp-support.c (demangled_name_complaint): Update.
7802         * macroscope.c (sal_macro_scope): Update.
7803         * dwarf-index-write.c (class debug_names): Update.
7804
7805 2018-05-23  Tom Tromey  <tom@tromey.com>
7806
7807         * complaints.c (clear_complaints): Remove "noisy" parameter.
7808         * complaints.h (clear_complaints): Update.
7809         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7810         (reread_symbols): Update.
7811
7812 2018-05-23  Tom Tromey  <tom@tromey.com>
7813
7814         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7815         SUBSEQUENT_MESSAGE.
7816         (vcomplaint, clear_complaints): Update.
7817         (symfile_explanations): Remove some messages.
7818
7819 2018-05-23  Tom Tromey  <tom@tromey.com>
7820
7821         * complaints.c (internal_complaint): Remove.
7822         * complaints.h (internal_complaint): Remove.
7823
7824 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7825
7826         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7827
7828 2018-05-22  Pedro Alves  <palves@redhat.com>
7829
7830         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7831         (remote_fileio_badfd, remote_fileio_return_errno)
7832         (remote_fileio_return_success, remote_fileio_func_open)
7833         (remote_fileio_func_open, remote_fileio_func_close)
7834         (remote_fileio_func_read, remote_fileio_func_write)
7835         (remote_fileio_func_lseek, remote_fileio_func_rename)
7836         (remote_fileio_func_unlink, remote_fileio_func_stat)
7837         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7838         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7839         remote_target parameter.
7840         (remote_fio_func_map) <func>: Add remote_target parameter.
7841         (do_remote_fileio_request, remote_fileio_request):
7842         * remote-fileio.h (remote_fileio_request):
7843         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7844         remote_target parameter.
7845         (remote_notif_process, handle_notification): Adjust to pass down
7846         the remote.
7847         (remote_notif_state_allocate): Add remote_target parameter.  Save
7848         it.
7849         * remote-notif.h (struct remote_target): Forward declare.
7850         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7851         remote_target parameter.
7852         (struct remote_notif_state) <remote>: New field.
7853         (remote_notif_ack, remote_notif_parse): Add remote_target
7854         parameter.
7855         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7856         remote_target parameter.
7857         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7858         (threads_listing_context, rmt_thread_action, protocol_feature)
7859         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7860         (packet_result, struct threads_listing_context, remote_state):
7861         Move definitions and declarations higher up.
7862         (remote_target) <~remote_target>: Declare.
7863         (remote_download_command_source, remote_file_put, remote_file_get)
7864         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7865         (remote_hostio_pread_vFile, remote_hostio_send_command)
7866         (remote_hostio_set_filesystem, remote_hostio_open)
7867         (remote_hostio_close, remote_hostio_unlink, remote_state)
7868         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7869         (get_memory_write_packet_size, get_memory_read_packet_size)
7870         (append_pending_thread_resumptions, remote_detach_1)
7871         (append_resumption, remote_resume_with_vcont)
7872         (add_current_inferior_and_thread, wait_ns, wait_as)
7873         (process_stop_reply, remote_notice_new_inferior)
7874         (process_initial_stop_replies, remote_add_thread)
7875         (btrace_sync_conf, remote_btrace_maybe_reopen)
7876         (remove_new_fork_children, kill_new_fork_children)
7877         (discard_pending_stop_replies, stop_reply_queue_length)
7878         (check_pending_events_prevent_wildcard_vcont)
7879         (discard_pending_stop_replies_in_queue, stop_reply)
7880         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7881         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7882         (remote_interrupt_as, remote_interrupt_ns)
7883         (remote_get_noisy_reply, remote_query_attached)
7884         (remote_add_inferior, remote_current_thread, get_current_thread)
7885         (set_thread, set_general_thread, set_continue_thread)
7886         (set_general_process, write_ptid)
7887         (remote_unpack_thread_info_response, remote_get_threadinfo)
7888         (parse_threadlist_response, remote_get_threadlist)
7889         (remote_threadlist_iterator, remote_get_threads_with_ql)
7890         (remote_get_threads_with_qxfer)
7891         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7892         (get_offsets, remote_check_symbols, remote_supported_packet)
7893         (remote_query_supported, remote_packet_size)
7894         (remote_serial_quit_handler, remote_detach_pid)
7895         (remote_vcont_probe, remote_resume_with_hc)
7896         (send_interrupt_sequence, interrupt_query)
7897         (remote_notif_get_pending_events, fetch_register_using_p)
7898         (send_g_packet, process_g_packet, fetch_registers_using_g)
7899         (store_register_using_P, store_registers_using_G)
7900         (set_remote_traceframe, check_binary_download)
7901         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7902         (remote_xfer_live_readonly_partial, remote_read_bytes)
7903         (remote_send_printf, remote_flash_write, readchar)
7904         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7905         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7906         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7907         (extended_remote_disable_randomization, extended_remote_run)
7908         (send_environment_packet, extended_remote_environment_support)
7909         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7910         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7911         (packet_command): Now methods of ...
7912         (remote_target): ... this class.
7913         (m_remote_state) <remote_target>: New field.
7914         (struct remote_state) <stop_reply_queue,
7915         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7916         fields.
7917         (remote_state::remote_state): Allocate stop_reply_queue.
7918         (remote_state): Delete global.
7919         (get_remote_state_raw): Delete.
7920         (remote_target::get_remote_state): Allocate m_remote_state on
7921         demand.
7922         (get_current_remote_target): New.
7923         (remote_ops, extended_remote_ops): Delete.
7924         (wait_forever_enabled_p, remote_async_inferior_event_token):
7925         Delete, moved to struct remote_state.
7926         (remote_target::close): Delete self.  Destruction bits split to
7927         ...
7928         (remote_target::~remote_target): ... this.
7929         (show_memory_packet_size): Adjust to use
7930         get_current_remote_target.
7931         (struct protocol_feature) <func>: Add remote_target parameter.
7932         All callers adjusted.
7933         (curr_quit_handler_target): New.
7934         (remote_serial_quit_handler): Reimplement.
7935         (remote_target::open_1): Adjust to use get_current_remote_target.
7936         Heap-allocate remote_target/extended_remote_target instances.
7937         (vcont_builder::vcont_builder): Add remote_target parameter, and
7938         save it in m_remote.  All callers adjusted.
7939         (vcont_builder::m_remote): New field.
7940         (vcont_builder::restart, vcont_builder::flush)
7941         (vcont_builder::push_action): Use it.
7942         (remote_target::commit_resume): Use it.
7943         (struct queue_iter_param) <remote>: New field.
7944         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7945         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7946         (check_pending_event_prevents_wildcard_vcont_callback)
7947         (remote_target::check_pending_events_prevent_wildcard_vcont)
7948         (remote_target::discard_pending_stop_replies)
7949         (remote_target::discard_pending_stop_replies_in_queue)
7950         (remote_target::remote_notif_remove_queued_reply): Fill in
7951         'remote' field.
7952         (remote_notif_get_pending_events): New.
7953         (remote_target::readchar, remote_target::remote_serial_write):
7954         Save/restore curr_quit_handler_target.
7955         (putpkt): New.
7956         (kill_new_fork_children): Fill in 'remote' field.
7957         (packet_command): Use get_current_remote_target, defer to
7958         remote_target method of same name.
7959         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7960         parameter, and save it in m_remote.  All callers adjusted.
7961         (scoped_remote_fd::release): Use m_remote.
7962         (scoped_remote_fd::m_remote): New field.
7963         (remote_file_put, remote_file_get, remote_file_delete): Use
7964         get_current_remote_target, defer to remote_target method of same
7965         name.
7966         (remote_btrace_reset): Add remote_state paremeter.  Update all
7967         callers.
7968         (remote_async_inferior_event_handler). Pass down 'data'.
7969         (remote_new_objfile): Use get_current_remote_target.
7970         (remote_target::vcont_r_supported): New.
7971         (set_range_stepping): Use get_current_remote_target and
7972         remote_target::vcont_r_supported.
7973         (_initialize_remote): Don't allocate 'remote_state' and
7974         'stop_reply_queue' globals.
7975         * remote.h (struct remote_target): Forward declare.
7976         (getpkt, putpkt, remote_notif_get_pending_events): Add
7977         'remote_target' parameter.
7978
7979 2018-05-22  Pedro Alves  <palves@redhat.com>
7980
7981         * remote.c (vcont_builder): Now a class.  Make all data members
7982         private.
7983         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7984         Declare methods.
7985         (vcont_builder_restart): Rename to ...
7986         (vcont_builder::restart): ... this.
7987         (vcont_builder_flush): Rename to ...
7988         (vcont_builder::flush): ... this.
7989         (vcont_builder_push_action): Rename to ...
7990         (vcont_builder::push_action): ... this.
7991         (remote_target::commit_resume): Adjust.
7992
7993 2018-05-22  Pedro Alves  <palves@redhat.com>
7994
7995         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7996         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7997         (get_fixed_memory_packet_size): New.
7998         (get_memory_packet_size): Use it.
7999         (set_memory_packet_size): Don't override the config size with
8000         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8001         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8002         Don't refer to get_memory_packet_size if not connected to a remote
8003         target.  Show "(default)" if configured size is 0.
8004
8005 2018-05-22  Pedro Alves  <palves@redhat.com>
8006
8007         * remote.c (remote_target::mourn_inferior): Move
8008         discard_pending_stop_replies call here from ...
8009         (_initialize_remote): ... here.
8010
8011 2018-05-22  Pedro Alves  <palves@redhat.com>
8012
8013         * remote.c (compare_section_command): Remove set_general_process
8014         call.
8015
8016 2018-05-22  Pedro Alves  <palves@redhat.com>
8017
8018         * remote.c (struct packet_reg, struct remote_arch_state):
8019         Move higher up in the file.
8020         (remote_state) <m_arch_states>: Store remote_arch_state values
8021         instead of remote_arch_state pointers.
8022         (remote_state::get_remote_arch_state): Adjust.
8023
8024 2018-05-22  Pedro Alves  <palves@redhat.com>
8025
8026         * remote.c: Include <unordered_map>.
8027         (remote_state): Now a class.
8028         (remote_state) <get_remote_arch_state>: Declare method.
8029         <get_remote_arch_state>: New field.
8030         (remote_arch_state) <remote_arch_state>: Declare ctor.
8031         <regs>: Now a unique_ptr.
8032         (remote_gdbarch_data_handle): Delete.
8033         (get_remote_arch_state): Delete.
8034         (remote_state::get_remote_arch_state): New.
8035         (get_remote_state): Adjust to call remote_state's
8036         get_remote_arch_state method.
8037         (init_remote_state): Delete, bits factored out to ...
8038         (remote_arch_state::remote_arch_state): ... this new method.
8039         (get_remote_packet_size, get_memory_packet_size)
8040         (process_g_packet, remote_target::fetch_registers)
8041         (remote_target::prepare_to_store, store_registers_using_G)
8042         (remote_target::store_registers, remote_target::get_trace_status):
8043         Adjust to call remote_state's method.
8044         (_initialize_remote): Remove reference to
8045         remote_gdbarch_data_handle.
8046
8047 2018-05-22  Pedro Alves  <palves@redhat.com>
8048
8049         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8050         pread>: New method declarations.
8051         (remote_target::open_1): Adjust.
8052         (readahead_cache_invalidate): Rename to ...
8053         (readahead_cache::invalidate): ... this, and adjust to be a class
8054         method.
8055         (readahead_cache_invalidate_fd): Rename to ...
8056         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8057         class method.
8058         (remote_hostio_pwrite): Adjust.
8059         (remote_hostio_pread_from_cache): Rename to ...
8060         (readahead_cache::pread): ... this, and adjust to be a class
8061         method.
8062         (remote_hostio_close): Adjust.
8063
8064 2018-05-22  Pedro Alves  <palves@redhat.com>
8065
8066         * remote.c (remote_hostio_close_cleanup): Delete.
8067         (class scoped_remote_fd): New.
8068         (remote_file_put, remote_file_get): Use it.
8069
8070 2018-05-22  Pedro Alves  <palves@redhat.com>
8071
8072         (struct vCont_action_support): Use bool and initialize all fields.
8073         (struct readahead_cache): Initialize all fields.
8074         (remote_state): Use bool and initialize all fields.
8075         (remote_state::remote_state, remote_state::~remote_state): New.
8076         (new_remote_state): Delete.
8077         (_initialize_remote): Use new to allocate remote_state.
8078
8079 2018-05-22  Pedro Alves  <palves@redhat.com>
8080             張俊芝  <zjz@zjz.name>
8081
8082         PR gdb/22973
8083         * c-exp.y: Include "c-support.h".
8084         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8085         of tolower.  Use c_ident_is_alpha to scan names.
8086         * c-lang.c: Include "c-support.h".
8087         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8088         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8089         * c-support.h: New file, with bits factored out from ...
8090         * cp-name-parser.y: ... this file.
8091         Include "c-support.h".
8092         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8093         c-support.h and renamed.
8094         (symbol_end, yylex): Adjust.
8095
8096 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8097
8098         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8099         parameter type to CORE_ADDR.
8100         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8101         parameter type in declaration to CORE_ADDR.
8102         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8103         target_auxv_search to get AT_HWCAP and use the result to get the
8104         target description.
8105         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8106         to CORE_ADDR. Remove the cast of the return value to unsigned
8107         long. Fix error predicate of target_auxv_search.
8108         (ppc_linux_nat_target::read_description): Change the type of the
8109         hwcap variable to CORE_ADDR.
8110
8111 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8112
8113         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8114         if the size of fpscr is larger than 32 bits.
8115
8116 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8117
8118         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8119         (ppc32_linux_vsxregmap): New global.
8120         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8121         regcache_supply_regset, and regcache_collect_regset.
8122         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8123         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8124         (fetch_vsx_register, store_vsx_register): Remove.
8125         (fetch_vsx_registers): Add regno parameter. Get regset using
8126         ppc_linux_vsxregset. Use regset to supply registers.
8127         (store_vsx_registers): Add regno parameter. Get regset using
8128         ppc_linux_vsxregset. Use regset to collect registers.
8129         (fetch_register): Call fetch_vsx_registers instead of
8130         fetch_vsx_register.
8131         (store_register): Call store_vsx_registers instead of
8132         store_vsx_register.
8133         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8134         new regno parameter.
8135         (store_ppc_registers): Call store_vsx_registers with -1 for the
8136         new regno parameter.
8137         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8138         (ppc_collect_vsxregset): Remove.
8139
8140 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8141
8142         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8143         offset fields.
8144         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8145         for vector register offset fields.
8146         (ppc64_fbsd_reg_offsets): Likewise.
8147         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8148         to vector register offset fields.
8149         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8150         to vector register offset fields.
8151         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8152         vector register offset fields.
8153         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8154         initializers for vector register offset fields.
8155         (rs6000_aix64_reg_offsets): Likewise.
8156         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8157         (ppc_supply_vrregset): Remove.
8158         (ppc_collect_vrregset): Remove.
8159         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8160         (ppc_linux_vrregset) : New function.
8161         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8162         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8163         (ppc32_linux_vrregset): Remove.
8164         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8165         and use result instead of ppc32_linux_vrregset.
8166         (ppc32_linux_reg_offsets): Remove initializers for vector register
8167         offset fields.
8168         (ppc64_linux_reg_offsets): Likewise.
8169         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8170         * ppc-linux-nat.c: Include regset.h.
8171         (gdb_vrregset_t): Adjust comment to account for little-endian
8172         mode.
8173         (supply_vrregset, fill_vrregset): Remove.
8174         (fetch_altivec_register, store_altivec_register): Remove.
8175         (fetch_altivec_registers): Add regno parameter. Get regset using
8176         ppc_linux_vrregset. Use regset to supply registers.
8177         (store_altivec_registers): Add regno parameter. Get regset using
8178         ppc_linux_vrregset. Use regset to collect registers.
8179         (fetch_register): Call fetch_altivec_registers instead of
8180         fetch_altivec_register.
8181         (store_register): Call store_altivec_registers instead of
8182         store_altivec_register.
8183         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8184         the new regno parameter.
8185         (store_ppc_registers): Call store_altivec_registers with -1 for
8186         the new regno parameter.
8187
8188 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8189
8190         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8191         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8192         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8193         (gdb_vrregset_t): Change array type size to
8194         PPC_LINUX_SIZEOF_VRREGSET.
8195         (gdb_vsxregset_t): Change array type size to
8196         PPC_LINUX_SIZEOF_VSXREGSET.
8197         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8198         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8199         PPC_LINUX_SIZEOF_VSXREGSET.
8200
8201 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8202
8203         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8204         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8205         nat/ppc-linux.c.
8206         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8207         ppc_linux_target_wordsize with tid.
8208         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8209         wordsize with tid.
8210         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8211         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8212         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8213         tid parameter. Remove static specifier.
8214         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8215         (ppc_linux_target_wordsize): New declaration.
8216
8217 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8218
8219         * arch/ppc-linux-common.c: New file.
8220         * arch/ppc-linux-common.h: New file.
8221         * arch/ppc-linux-tdesc.h: New file.
8222         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8223         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8224         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8225         arch/ppc-linux-tdesc.h.
8226         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8227         arch/ppc-linux-tdesc.h.
8228         (ppc_linux_nat_target::read_description): Remove target
8229         description matching code. Fill a ppc_linux_features struct and
8230         call ppc_linux_match_description with it. Move comment about ISA
8231         2.05 to ppc-linux-common.c.
8232         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8233         arch/ppc-linux-tdesc.h.
8234         (ppc_linux_core_read_description): Remove target description
8235         matching code. Fill a ppc_linux_features struct and call
8236         ppc_linux_match_description with it.
8237         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8238         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8239         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8240         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8241         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8242         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8243         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8244         (tdesc_powerpc_e500l): Remove.
8245
8246 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8247
8248         * ada-lang.c (catch_assert_command): Pass empty string instead
8249         of NULL for excep_string argument.
8250
8251 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8252
8253         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8254         the width of the requested register exceeds the width of the
8255         `ptrace' data type.
8256
8257 2018-05-21  Tom Tromey  <tom@tromey.com>
8258
8259         * printcmd.c (output_command): Remove.
8260         (output_command_const): Rename to output_command.
8261         * valprint.h (output_command): Rename from output_command_const.
8262         * tracepoint.c (trace_dump_actions): Call output_command.
8263
8264 2018-05-21  Tom Tromey  <tom@tromey.com>
8265
8266         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8267         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8268         * ada-lang.h (create_ada_exception_catchpoint): Update.
8269         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8270         std::string.
8271         (create_excep_cond_exprs, ~ada_catchpoint)
8272         (should_stop_exception, print_one_exception)
8273         (print_mention_exception, print_recreate_exception): Update.
8274         (ada_get_next_arg): Remove.
8275         (catch_ada_exception_command_split): Use std::string.  Change type
8276         of "excep_string", "cond_string".
8277         (catch_ada_exception_command): Update.
8278         (create_ada_exception_catchpoint): Change type of excep_string.
8279         (ada_exception_sal): Remove excep_string parameter.
8280         (~ada_catchpoint): Remove.
8281
8282 2018-05-21  Tom Tromey  <tom@tromey.com>
8283
8284         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8285         cleanup.
8286
8287 2018-05-21  Tom Tromey  <tom@tromey.com>
8288
8289         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8290         Return unique_xmalloc_ptr.
8291         (print_it_exception): Update.
8292
8293 2018-05-21  Tom Tromey  <tom@tromey.com>
8294
8295         * tracepoint.c (trace_dump_actions): Use std::string.
8296
8297 2018-05-21  Tom Tromey  <tom@tromey.com>
8298
8299         * symfile.c (reread_symbols): Use std::string for original_name.
8300
8301 2018-05-21  Tom Tromey  <tom@tromey.com>
8302
8303         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8304         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8305         constructor.
8306
8307 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8308
8309         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8310         instance to...
8311         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8312         * objfiles.c (get_objfile_bfd_data): Allocate
8313         objfile_per_bfd_storage with obstack_new when allocating on
8314         obstack.
8315
8316 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8317
8318         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8319         OBSTACK_ZALLOC.
8320         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8321         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8322         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8323         (add_pending): Likewise.
8324         (parse_symbol): Likewise.
8325         (parse_partial_symbols): Likewise.
8326         (psymtab_to_symtab_1): Likewise.
8327         (new_psymtab): Likewise.
8328         (elfmdebug_build_psymtabs): Likewise.
8329         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8330         * objfiles.c (get_objfile_bfd_data): Likewise.
8331         (objfile_register_static_link): Likewise.
8332         * psymtab.c (allocate_psymtab): Likewise.
8333         * stabsread.c (read_member_functions): Likewise.
8334         * xcoffread.c (xcoff_end_psymtab): Likewise.
8335
8336 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8337
8338         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8339         compiler supports std::is_trivially_constructible.
8340         * common/poison.h: Include obstack.h.
8341         (IsMallocable): Define to is_trivially_constructible if the
8342         compiler supports it, define to true_type otherwise.
8343         (xobnew): New.
8344         (XOBNEW): Redefine.
8345         (xobnewvec): New.
8346         (XOBNEWVEC): Redefine.
8347         * gdb_obstack.h (obstack_zalloc): New.
8348         (OBSTACK_ZALLOC): Redefine.
8349         (obstack_calloc): New.
8350         (OBSTACK_CALLOC): Redefine.
8351         (obstack_new): New.
8352         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8353         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8354         gdbarch.c.
8355         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8356         obstack_calloc/obstack_zalloc.
8357         (gdbarch_obstack_zalloc): Remove.
8358         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8359
8360 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8361
8362         * stack.c (backtrace_command_1): Remove useless variable int i.
8363
8364 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8365
8366         * stack.c (print_frame_info): Fix comment.
8367
8368 2018-05-18  Tom Tromey  <tom@tromey.com>
8369
8370         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8371         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8372         (~dwarf2_per_objfile): Update
8373         (dwarf2_get_dwz_file): Use new.
8374         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8375         unique_ptr.
8376
8377 2018-05-18  Tom Tromey  <tom@tromey.com>
8378
8379         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8380         unique_ptr.
8381         * dwarf2read.c (struct dwp_file): Add constructor and
8382         initializers.
8383         (open_and_init_dwp_file): Return a unique_ptr.
8384         (dwarf2_per_objfile, create_dwp_hash_table)
8385         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8386         (lookup_dwo_unit_in_dwp): Update.
8387         (open_and_init_dwp_file, get_dwp_file): Update.
8388
8389 2018-05-18  Tom Tromey  <tom@tromey.com>
8390
8391         * dwarf2read.c (dwarf2_per_objfile): Update.
8392         (struct mapped_index): Add initializers.
8393         (dwarf2_read_index): Use new.
8394         (dw2_symtab_iter_init): Update.
8395         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8396         unique_ptr.
8397
8398 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8399
8400         * dwarf2read.c (mapped_index) <total_size>: Remove.
8401
8402 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8403
8404         * unittests/format_pieces-selftests.c (test_format_specifier):
8405         Add ARI comments.
8406
8407 2018-05-18  Tom Tromey  <tom@tromey.com>
8408
8409         * c-typeprint.c (maybe_print_hole): New function.
8410         (c_print_type_struct_field_offset): Update.
8411         (c_type_print_base_struct_union): Call maybe_print_hole.
8412
8413 2018-05-17  Keith Seitz  <keiths@redhat.com>
8414
8415         * breakpoint.c (build_bpstat_chain): New function, moved from
8416         bpstat_stop_status.
8417         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8418         If no stop chain is passed, call build_bpstat_chain to build it.
8419         * breakpoint.h (build_bpstat_chain): Declare.
8420         (bpstat_stop_status): Move documentation here from breakpoint.c.
8421         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8422         build the stop chain and pass it to skip_inline_frames.
8423         Pass this stop chain to bpstat_stop_status.
8424         * inline-frame.c: Include breakpoint.h.
8425         (stopped_by_user_bp_inline_frame): New function.
8426         (skip_inline_frames): Add parameter `stop_chain'.
8427         Move documention to inline-frame.h.
8428         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8429         whether the frame should be elided.
8430         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8431         Add moved documentation and update for new parameter.
8432
8433 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8434
8435         PR cli/14975
8436         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8437         unittests/format_pieces-selftests.c.
8438         * common/format.h (format_piece) <operator==>: New.
8439         (format_pieces) <operator[]>: Remove.
8440         * common/format.c (format_pieces::format_pieces): Handle \e.
8441         * unittests/format_pieces-selftests.c: New.
8442
8443 2018-05-17  Tom Tromey  <tom@tromey.com>
8444
8445         PR symtab/23010:
8446         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8447         (dw2_instantiate_symtab): Add skip_partial parameter.
8448         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8449         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8450         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8451         (dw2_expand_symtabs_matching_one)
8452         (dw2_find_pc_sect_compunit_symtab)
8453         (dw2_debug_names_lookup_symbol)
8454         (dw2_debug_names_expand_symtabs_for_function): Update.
8455         (init_cutu_and_read_dies): Add skip_partial parameter.
8456         (process_psymtab_comp_unit, build_type_psymtabs_1)
8457         (process_skeletonless_type_unit, load_partial_comp_unit)
8458         (psymtab_to_symtab_1): Update.
8459         (load_full_comp_unit): Add skip_partial parameter.
8460         (process_imported_unit_die, dwarf2_read_addr_index)
8461         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8462         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8463         (read_signatured_type): Update.
8464
8465 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8466
8467         * value.c (release_value): Remove unused variable.
8468         (record_latest_value): Likewise.
8469         (access_value_history): Likewise.
8470         (preserve_values): Likewise.
8471
8472 2018-05-17  Tom Tromey  <tom@tromey.com>
8473
8474         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8475         Initialize.
8476
8477 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8478
8479         PR gdb/22286
8480         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8481         Also handle registers whose width is not a multiple of
8482         PTRACE_TYPE_RET.
8483         (linux_nat_trad_target::store_register): Likewise.
8484
8485 2018-05-16  Tom Tromey  <tom@tromey.com>
8486
8487         * gdbcore.h (core_bfd): Redefine.
8488         * corelow.c (core_target::close): Update.
8489         (core_target_open): Update.
8490         * progspace.h (struct program_space) <cbfd>: Now a
8491         gdb_bfd_ref_ptr.
8492
8493 2018-05-16  Tom Tromey  <tom@tromey.com>
8494
8495         PR cli/19551:
8496         * symfile-add-flags.h (enum symfile_add_flags)
8497         <SYMFILE_NOT_FILENAME>: New constant.
8498         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8499         objfile name from BFD.
8500         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8501         * minidebug.c (find_separate_debug_file_in_section): Put
8502         ".gnu_debugdata" into BFD's file name.
8503
8504 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8505
8506         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8507         Remove.
8508
8509 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8510
8511         PR binutils/21446
8512         * aarch64-tdep.c (aarch64_analyze_prologue,
8513         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8514         Indicate not interested in errors.
8515
8516 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8517
8518         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8519         Supply the MIPS_ZERO_REGNUM register.
8520
8521 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8522
8523         * mips-tdep.c (mask_address_var): Make variable static.
8524
8525 2018-05-14  Tom Tromey  <tom@tromey.com>
8526
8527         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8528
8529 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8530
8531         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8532         FXSAVE_ADDR for the mxcsr register.
8533
8534 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8535
8536         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8537
8538 2018-05-11  Pedro Alves  <palves@redhat.com>
8539
8540         * corelow.c (core_target) <core_target>: No longer inline.
8541         Initialize m_core_gdbarch, m_core_vec and build the section table
8542         here.
8543         <~core_target>: New.
8544         <core_gdbarch, get_core_register_section>: New methods.
8545         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8546         factored out from ...
8547         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8548         (core_ops): Delete.
8549         (sniff_core_bfd): Add gdbarch parameter.
8550         (core_close): Delete, merged into ...
8551         (core_target::close): ... here.  Delete self.
8552         (core_close_cleanup): Delete.
8553         (core_target_open): Allocate a core_target on the heap.  Use a
8554         unique_ptr instead of a cleanup.  Bits moved into the core_target
8555         ctor.  Adjust to use core_target methods instead of globals.
8556         (get_core_register_section): Rename to ...
8557         (core_target::get_core_register_section): ... this and adjust.
8558         (struct get_core_registers_cb_data): New.
8559         (get_core_registers_cb): Use it.  Use bool.
8560         (core_target::fetch_registers, core_target::files_info)
8561         (core_target::xfer_partial, core_target::read_description)
8562         (core_target::pid_to, core_target::thread_name): Adjust to
8563         reference class fields instead of globals.
8564         * target.h (struct target_ops_deleter, target_ops_up): New.
8565
8566 2018-05-11  Pedro Alves  <palves@redhat.com>
8567
8568         * corefile.c (core_file_command): Move to corelow.c.
8569         * corelow.c (the_core_target): Delete.
8570         (core_file_command): Moved from corefile.c.  Check exec_bfd
8571         instead of the_core_target.  Use target_detach instead of calling
8572         into the_core_target directly.
8573         (maybe_say_no_core_file_now): New.
8574         (core_target::detach): Use it.
8575         (_initialize_corelow): Remove references to the_core_target.
8576         * gdbcore.h (the_core_target): Delete.
8577
8578 2018-05-11  Tom Tromey  <tromey@redhat.com>
8579             Pedro Alves  <palves@redhat.com>
8580
8581         * corefile.c (core_bfd): Remove.
8582         * gdbcore.h (core_bfd): Now a macro.
8583         * progspace.h (struct program_space) <cbfd>: New field.
8584
8585 2018-05-11  Tom Tromey  <tom@tromey.com>
8586
8587         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8588         gdb::def_vector.
8589
8590 2018-05-10  Tom Tromey  <tom@tromey.com>
8591
8592         * configure: Rebuild.
8593         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8594
8595 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8596
8597         PR server/23158:
8598         * regformats/regdat.sh: Adjust script, following the addition
8599         of the new expedite_regs parameter to init_target_desc.
8600
8601 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8602     
8603         PR gdb/23127
8604         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8605         set_gdbarch_significant_addr_bit.
8606         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8607         set_gdbarch_significant_addr_bit.
8608         * utils.c (address_significant): Update to sign extend addr.
8609
8610 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8611
8612         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8613         (xtensa_linux_init_abi): Limit tdep->num_regs by
8614         tdep->num_nopriv_regs.
8615         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8616         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8617         not initialized.
8618
8619 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8620
8621         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8622
8623 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8624
8625         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8626         (I387_MXCSR_INIT_VAL): New constant.
8627         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8628         buffer if it was supplied by the inferior.
8629         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8630         (i387_xsave_get_clear_bv): New function.
8631         (i387_supply_xsave): Only read x87 control registers from the
8632         xsave buffer if the feature is enabled, and the state will have
8633         been written, otherwise, provide a suitable default.
8634         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8635         including x87 control registers.  Update control registers if they
8636         have changed from the default value, and mark features as enabled
8637         as required.
8638         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8639
8640 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8641
8642         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8643
8644 2018-05-07  Tom Tromey  <tom@tromey.com>
8645
8646         * configure: Rebuild.
8647         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8648
8649 2018-05-07  Tom Tromey  <tom@tromey.com>
8650
8651         PR tdep/20362:
8652         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8653         bit.  Use correct value for VDIV.
8654
8655 2018-05-04  Tom Tromey  <tom@tromey.com>
8656
8657         * configure: Rebuild.
8658         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8659
8660 2018-05-04  Tom Tromey  <tom@tromey.com>
8661
8662         * linux-record.c (record_linux_system_call) <case
8663         RECORD_SYS_RECVFROM>: Add "break".
8664
8665 2018-05-04  Tom Tromey  <tom@tromey.com>
8666
8667         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8668         Add missing "break".
8669         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8670         Add missing "break".
8671
8672 2018-05-04  Tom Tromey  <tom@tromey.com>
8673
8674         * rs6000-tdep.c (ppc_process_record_op4)
8675         (ppc_process_record_op63): Add fall-through comment.
8676
8677 2018-05-04  Tom Tromey  <tom@tromey.com>
8678
8679         * i386-tdep.c (i386_process_record): Add fall-through comment.
8680
8681 2018-05-04  Tom Tromey  <tom@tromey.com>
8682
8683         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8684         comment.
8685
8686 2018-05-04  Tom Tromey  <tom@tromey.com>
8687
8688         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8689         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8690         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8691         comment.
8692         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8693         comment.
8694         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8695         comment.
8696
8697 2018-05-04  Tom Tromey  <tom@tromey.com>
8698
8699         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8700
8701 2018-05-04  Tom Tromey  <tom@tromey.com>
8702
8703         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8704         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8705         * symfile.c (section_is_mapped): Fix fall-through comment.
8706         * stabsread.c (define_symbol, read_member_functions): Fix
8707         fall-through comment.
8708         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8709         comment.
8710         * remote.c (remote_wait_as): Fix fall-through comment.
8711         * p-exp.y (yylex): Fix fall-through comment.
8712         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8713         comment.
8714         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8715         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8716         * jv-exp.y (yylex): Fix fall-through comment.
8717         * go-exp.y (lex_one_token): Fix fall-through comment.
8718         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8719         fall-through comment.
8720         * f-exp.y (yylex): Fix fall-through comment.
8721         * dwarf2read.c (process_die): Fix fall-through comments.
8722         * dbxread.c (process_one_symbol): Fix fall-through comment.
8723         * d-exp.y (lex_one_token): Fix fall-through comment.
8724         * cp-name-parser.y (yylex): Fix fall-through comment.
8725         * coffread.c (coff_symtab_read): Fix fall-through comment.
8726         * c-exp.y (lex_one_token): Fix fall-through comment.
8727         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8728         comment.
8729         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8730         comment.
8731
8732 2018-05-04  Tom Tromey  <tom@tromey.com>
8733
8734         PR python/22730:
8735         * NEWS: Mention gdb.execute change.
8736         * gdbcmd.h (execute_control_command): Don't declare.
8737         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8738         execute_control_commands, execute_control_commands_to_string.
8739         * cli/cli-script.h (execute_control_commands)
8740         (execute_control_commands_to_string): Declare.
8741         (execute_control_command): Add from_tty parameter.
8742         * cli/cli-script.c (execute_control_commands)
8743         (execute_control_commands_to_string): New functions.
8744         (execute_user_command): Use execute_control_commands.
8745         (execute_control_command_1): Add "from_tty" parameter.  Update.
8746         (execute_control_command): Likewise.
8747
8748 2018-05-04  Tom Tromey  <tom@tromey.com>
8749
8750         PR python/22731:
8751         * NEWS: Mention that breakpoint commands are writable.
8752         * python/py-breakpoint.c (bppy_set_commands): New function.
8753         (breakpoint_object_getset) <"commands">: Use it.
8754
8755 2018-05-04  Tom Tromey  <tom@tromey.com>
8756
8757         * tracepoint.c (actions_command): Update.
8758         * mi/mi-cmd-break.c (mi_command_line_array)
8759         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8760         (mi_read_next_line): Remove.
8761         (mi_cmd_break_commands): Update.
8762         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8763         function_view.
8764         * cli/cli-script.c (get_command_line): Update.
8765         (process_next_line): Use function_view.  Constify.
8766         (recurse_read_control_structure, read_command_lines)
8767         (read_command_lines_1): Change argument types to function_view.
8768         (do_define_command, document_command): Update.
8769         * breakpoint.h (check_tracepoint_command): Don't declare.
8770         * breakpoint.c (check_tracepoint_command): Remove.
8771         (commands_command_1, create_tracepoint_from_upload): Update.
8772
8773 2018-05-04  Tom Tromey  <tom@tromey.com>
8774
8775         PR gdb/11750:
8776         * cli/cli-script.h (enum command_control_type) <define_control>:
8777         New constant.
8778         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8779         (build_command_line, execute_control_command_1)
8780         (process_next_line): Likewise.
8781         (do_define_command): New function, extracted from define_command.
8782         (define_command): Use it.
8783
8784 2018-05-04  Tom Tromey  <tom@tromey.com>
8785
8786         * tracepoint.c (actions_command): Update.
8787         * cli/cli-script.h (read_command_lines): Update.
8788         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8789         (MAX_TMPBUF): Remove define.
8790         (define_command): Use string_printf.
8791         (document_command): Likewise.
8792         * breakpoint.c (commands_command_1): Update.
8793
8794 2018-05-04  Tom Tromey  <tom@tromey.com>
8795
8796         * top.c (execute_command): Update.
8797         * cli/cli-script.h (print_command_lines): Now varargs.
8798         * cli/cli-script.c (print_command_lines): Now varargs.
8799         (execute_control_command_1) <case while_control, case if_control>:
8800         Update.
8801
8802 2018-05-04  Tom Tromey  <tom@tromey.com>
8803
8804         * tracepoint.c (all_tracepoint_actions): Rename from
8805         all_tracepoint_actions_and_cleanup.  Change return type.
8806         (actions_command, encode_actions_1, encode_actions)
8807         (trace_dump_actions, tdump_command): Update.
8808         * remote.c (remote_download_command_source): Update.
8809         * python/python.c (gdbpy_eval_from_control_command)
8810         (python_command, python_interactive_command): Update.
8811         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8812         * guile/guile.c (guile_command)
8813         (gdbscm_eval_from_control_command, guile_command): Update.
8814         * compile/compile.c (compile_code_command)
8815         (compile_print_command, compile_to_object): Update.
8816         * cli/cli-script.h (struct command_lines_deleter): New.
8817         (counted_command_line): New typedef.
8818         (struct command_line): Add constructor, destructor.
8819         <body_list>: Remove.
8820         <body_list_0, body_list_1>: New members.
8821         (command_line_up): Remove typedef.
8822         (read_command_lines, read_command_lines_1, get_command_line):
8823         Update.
8824         (copy_command_lines): Don't declare.
8825         * cli/cli-script.c (build_command_line): Use "new".
8826         (get_command_line): Return counted_command_line.
8827         (print_command_lines, execute_user_command)
8828         (execute_control_command_1, while_command, if_command): Update.
8829         (realloc_body_list): Remove.
8830         (process_next_line, recurse_read_control_structure): Update.
8831         (read_command_lines, read_command_lines_1): Return counted_command_line.
8832         (free_command_lines): Use "delete".
8833         (copy_command_lines): Remove.
8834         (define_command, document_command, show_user_1): Update.
8835         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8836         a counted_command_line.
8837         * breakpoint.h (counted_command_line): Remove typedef.
8838         (breakpoint_set_commands): Update.
8839         * breakpoint.c (check_no_tracepoint_commands)
8840         (validate_commands_for_breakpoint): Update.
8841         (breakpoint_set_commands): Change commands to be a
8842         counted_command_line.
8843         (commands_command_1, update_dprintf_command_list)
8844         (create_tracepoint_from_upload): Update.
8845
8846 2018-05-04  Tom Tromey  <tom@tromey.com>
8847
8848         * cli/cli-decode.h (cmd_list_element): New constructor.
8849         (~cmd_list_element): New destructor.
8850         (struct cmd_list_element): Add initializers.
8851         * cli/cli-decode.c (do_add_cmd): Use "new".
8852         (delete_cmd): Use "delete".
8853
8854 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8855             Pedro Alves <palves@redhat.com>
8856
8857         PR breakpoints/19806 and support for PR external/20207.
8858         * NEWS: Mention Aarch64 watchpoint improvements.
8859         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8860         watchpoints and PR external/20207 watchpoints.
8861         * nat/aarch64-linux-hw-point.c
8862         (kernel_supports_any_contiguous_range): New.
8863         (aarch64_watchpoint_offset): New.
8864         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8865         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8866         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8867         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8868         next_addr_orig_p.  Support PR external/20207 watchpoints.
8869         (aarch64_downgrade_regs): New.
8870         (aarch64_dr_state_insert_one_point): New parameters offset and
8871         addr_orig.
8872         (aarch64_dr_state_remove_one_point): Likewise.
8873         (aarch64_handle_breakpoint): Update caller.
8874         (aarch64_handle_aligned_watchpoint): Likewise.
8875         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8876         aligned_offset.
8877         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8878         aarch64_downgrade_regs.
8879         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8880         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8881         (DR_CONTROL_MASK): ... this.
8882         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8883         (unsigned int aarch64_watchpoint_offset): New prototype.
8884         (aarch64_linux_set_debug_regs): Remove const from state.
8885         * utils.c (align_up, align_down): Move to ...
8886         * common/common-utils.c (align_up, align_down): ... here.
8887         * utils.h (align_up, align_down): Move to ...
8888         * common/common-utils.h (align_up, align_down): ... here.
8889
8890 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8891
8892         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8893         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8894         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8895         Re-implement to match the ABI as summarized in GCC's
8896         gcc/config/sparc/sparc.c.  All callers updated.
8897         (sparc32_store_arguments): Remove assertion.
8898
8899 2018-05-04  Tom Tromey  <tom@tromey.com>
8900
8901         * printcmd.c: Don't include tui.h.
8902         (decode_format): Use skip_spaces.
8903
8904 2018-05-04  Tom Tromey  <tom@tromey.com>
8905
8906         PR gdb/22619:
8907         * printcmd.c (last_count): New global.
8908         (x_command): Use saved count when repeating.
8909
8910 2018-05-04  Tom Tromey  <tom@tromey.com>
8911
8912         * nto-procfs.c (do_closedir_cleanup): Remove.
8913         (procfs_pidlist): Use gdb_dir_up.
8914         * procfs.c (do_closedir_cleanup): Remove.
8915         (proc_update_threads): Use gdb_dir_up.
8916         * common/filestuff.h (struct gdb_dir_deleter): New.
8917         (gdb_dir_up): New typedef.
8918
8919 2018-05-04  Tom Tromey  <tom@tromey.com>
8920
8921         * ada-lang.c (print_mention_exception): Use std::string.
8922
8923 2018-05-04  Tom Tromey  <tom@tromey.com>
8924
8925         * ada-lang.c (create_excep_cond_exprs): Update.
8926         (ada_exception_catchpoint_cond_string): Use std::string.
8927
8928 2018-05-04  Tom Tromey  <tom@tromey.com>
8929
8930         * ada-lang.c (xget_renaming_scope): Return std::string.
8931         (old_renaming_is_invisible): Update.
8932
8933 2018-05-04  Tom Tromey  <tom@tromey.com>
8934
8935         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8936         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8937
8938 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8939
8940         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8941
8942 2018-05-04  Tom Tromey  <tom@tromey.com>
8943
8944         * remote.c (remote_query_supported_append): Change type.
8945         (remote_check_symbols): Update.
8946
8947 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8948
8949         PR gdb/11420
8950         * configure.ac: Prepend libpython.
8951         * python/python-config.py: Likewise.
8952         * configure: Regenerate.
8953
8954 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8957
8958 2018-05-03  Pedro Alves  <palves@redhat.com>
8959
8960         * s390-linux-nat.c
8961         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8962         override.  Write 'true' instead of '1'.
8963         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8964         declaration.
8965
8966 2018-05-02  Pedro Alves  <palves@redhat.com>
8967
8968         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8969         add_inf_child_target.
8970         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8971         add_inf_child_target.
8972         * aix-thread.c (aix_thread_target_info): New.
8973         (aix_thread_target) <shortname, longname, doc>: Delete.
8974         <info>: New.
8975         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8976         add_inf_child_target.
8977         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8978         add_inf_child_target.
8979         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8980         add_inf_child_target.
8981         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8982         add_inf_child_target.
8983         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8984         add_inf_child_target.
8985         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8986         add_inf_child_target.
8987         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8988         add_inf_child_target.
8989         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8990         add_inf_child_target.
8991         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8992         add_inf_child_target.
8993         * bfd-target.c (target_bfd_target_info): New.
8994         (target_bfd) <shortname, longname, doc>: Delete.
8995         <info>: New.
8996         * bsd-kvm.c (bsd_kvm_target_info): New.
8997         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8998         <info>: New.
8999         (bsd_kvm_target::open): Rename to ...
9000         (bsd_kvm_target_open): ... this.  Adjust.
9001         * bsd-uthread.c (bsd_uthread_target_info): New.
9002         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9003         <info>: New.
9004         * corefile.c (core_file_command): Adjust.
9005         * corelow.c (core_target_info): New.
9006         (core_target) <shortname, longname, doc>: Delete.
9007         <info>: New.
9008         (core_target::open): Rename to ...
9009         (core_target_open): ... this.  Adjust.
9010         * ctf.c (ctf_target_info): New.
9011         (ctf_target) <shortname, longname, doc>: Delete.
9012         <info>: New.
9013         (ctf_target::open): Rename to ...
9014         (ctf_target_open): ... this.
9015         (_initialize_ctf): Adjust.
9016         * exec.c (exec_target_info): New.
9017         (exec_target) <shortname, longname, doc>: Delete.
9018         <info>: New.
9019         (exec_target::open): Rename to ...
9020         (exec_target_open): ... this.
9021         * gdbcore.h (core_target_open): Declare.
9022         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9023         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9024         add_inf_child_target.
9025         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9026         add_inf_child_target.
9027         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9028         add_inf_child_target.
9029         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9030         add_inf_child_target.
9031         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9032         add_inf_child_target.
9033         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9034         add_inf_child_target.
9035         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9036         add_inf_child_target.
9037         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9038         add_inf_child_target.
9039         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9040         add_inf_child_target.
9041         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9042         add_inf_child_target.
9043         * inf-child.c (inf_child_target_info): New.
9044         (inf_child_target::info): New.
9045         (inf_child_open_target): Remove 'target' parameter.  Use
9046         get_native_target instead.
9047         (inf_child_target::open): Delete.
9048         (add_inf_child_target): New.
9049         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9050         Delete.
9051         <info>: New.
9052         (add_inf_child_target): Declare.
9053         (inf_child_open_target): Declare.
9054         * linux-thread-db.c (thread_db_target_info): New.
9055         (thread_db_target) <shortname, longname, doc>: Delete.
9056         <info>: New.
9057         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9058         add_inf_child_target.
9059         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9060         add_inf_child_target.
9061         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9062         add_inf_child_target.
9063         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9064         add_inf_child_target.
9065         * make-target-delegates (print_class): Adjust.
9066         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9067         add_inf_child_target.
9068         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9069         add_inf_child_target.
9070         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9071         add_inf_child_target.
9072         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9073         add_inf_child_target.
9074         * nto-procfs.c (nto_native_target_info): New.
9075         (nto_procfs_target_native) <shortname, longname, doc>:
9076         Delete.
9077         <info>: New.
9078         (nto_procfs_target_info): New.
9079         (nto_procfs_target_procfs) <shortname, longname, doc>:
9080         Delete.
9081         <info>: New.
9082         (init_procfs_targets): Adjust.
9083         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9084         add_inf_child_target.
9085         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9086         add_inf_child_target.
9087         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9088         add_inf_child_target.
9089         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9090         add_inf_child_target.
9091         * ravenscar-thread.c (ravenscar_target_info): New.
9092         (ravenscar_thread_target) <shortname, longname, doc>:
9093         Delete.
9094         <info>: New.
9095         * record-btrace.c (record_btrace_target_info):
9096         (record_btrace_target) <shortname, longname, doc>: Delete.
9097         <info>: New.
9098         (record_btrace_target::open): Rename to ...
9099         (record_btrace_target_open): ... this.  Adjust.
9100         * record-full.c (record_longname, record_doc): New.
9101         (record_full_base_target) <shortname, longname, doc>: Delete.
9102         <info>: New.
9103         (record_full_target_info): New.
9104         (record_full_target): <shortname>: Delete.
9105         <info>: New.
9106         (record_full_core_open_1, record_full_open_1): Update comments.
9107         (record_full_base_target::open): Rename to ...
9108         (record_full_open): ... this.
9109         (cmd_record_full_restore): Update.
9110         (_initialize_record_full): Update.
9111         * remote-sim.c (remote_sim_target_info): New.
9112         (gdbsim_target) <shortname, longname, doc>: Delete.
9113         <info>: New.
9114         (gdbsim_target::open): Rename to ...
9115         (gdbsim_target_open): ... this.
9116         (_initialize_remote_sim): Adjust.
9117         * remote.c (remote_doc): New.
9118         (remote_target_info): New.
9119         (remote_target) <shortname, longname, doc>: Delete.
9120         <info>: New.
9121         (extended_remote_target_info): New.
9122         (extended_remote_target) <shortname, longname, doc>: Delete.
9123         <info>: New.
9124         (remote_target::open_1): Make static.  Adjust.
9125         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9126         * s390-linux-nat.c (_initialize_s390_nat): Use
9127         add_inf_child_target.
9128         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9129         add_inf_child_target.
9130         * sol-thread.c (thread_db_target_info): New.
9131         (sol_thread_target) <shortname, longname, doc>: Delete.
9132         <info>: New.
9133         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9134         add_inf_child_target.
9135         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9136         add_inf_child_target.
9137         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9138         add_inf_child_target.
9139         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9140         add_inf_child_target.
9141         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9142         add_inf_child_target.
9143         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9144         add_inf_child_target.
9145         * spu-linux-nat.c (_initialize_spu_nat): Use
9146         add_inf_child_target.
9147         * spu-multiarch.c (spu_multiarch_target_info): New.
9148         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9149         <info>: New.
9150         * target-delegates.c: Regenerate.
9151         * target.c: Include <unordered_map>.
9152         (target_ops_p): Delete.
9153         (DEF_VEC_P(target_ops_p)): Delete.
9154         (target_factories): New.
9155         (test_target_info): New.
9156         (test_target_ops::info): New.
9157         (open_target): Adjust to use target_factories.
9158         (add_target_with_completer): Rename to ...
9159         (add_target): ... this.  Change prototype.  Register target_info
9160         and open callback in target_factories.  Register target_info in
9161         command context instead of target_ops.
9162         (add_target): Delete old implementation.
9163         (add_deprecated_target_alias): Change prototype.  Adjust.
9164         (the_native_target): New.
9165         (set_native_target, get_native_target): New.
9166         (find_default_run_target): Use the_native_target.
9167         (find_attach_target, find_run_target): Simplify.
9168         (target_ops::open): Delete.
9169         (dummy_target_info): New.
9170         (dummy_target::shortname, dummy_target::longname)
9171         (dummy_target::doc): Delete.
9172         (dummy_target::info): New.
9173         (debug_target::shortname, debug_target::longname)
9174         (debug_target::doc): Delete.
9175         (debug_target::info): New.
9176         * target.h (struct target_info): New.
9177         (target_ops::~target_ops): Add comment.
9178         (target_ops::info): New.
9179         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9180         longer virtual.  Implement in terms of target_info.
9181         (set_native_target, get_native_target): Declare.
9182         (target_open_ftype): New.
9183         (add_target, add_target_with_completer)
9184         (add_deprecated_target_alias): Change prototype.
9185         (test_target) <shortname, longname, doc>: Delete.
9186         <info>: New.
9187         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9188         add_inf_child_target.
9189         * tracefile-tfile.c (tfile_target_info): New.
9190         (tfile_target) <shortname, longname, doc>: Delete.
9191         <info>: New.
9192         (tfile_target::open): Rename to ...
9193         (tfile_target_open): ... this.
9194         (_initialize_tracefile_tfile): Adjust.
9195         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9196         add_inf_child_target.
9197         * windows-nat.c (_initialize_windows_nat): Use
9198         add_inf_child_target.
9199         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9200         add_inf_child_target.
9201
9202 2018-05-02  Pedro Alves  <palves@redhat.com>
9203
9204         * linux-nat.h (linux_nat_target) <low_new_thread,
9205         low_delete_thread, low_new_fork, low_forget_process,
9206         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9207         New virtual methods.
9208         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9209         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9210         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9211         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9212         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9213         Delete.
9214         * linux-fork.c (delete_fork): Adjust to call low method.
9215         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9216         (linux_nat_new_fork, linux_nat_forget_process_hook)
9217         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9218         (linux_nat_status_is_event):
9219         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9220         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9221         to call low method.
9222         (sigtrap_is_event): Rename to ...
9223         (linux_nat_target::low_status_is_event): ... this.
9224         (linux_nat_set_status_is_event): Delete.
9225         (save_stop_reason, linux_nat_wait_1)
9226         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9227         low methods.
9228         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9229         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9230         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9231         (linux_nat_set_prepare_to_resume): Delete.
9232         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9233         low virtual methods.
9234         * amd64-linux-nat.c: Likewise.
9235         * arm-linux-nat.c: Likewise.
9236         * i386-linux-nat.c: Likewise.
9237         * ia64-linux-nat.c: Likewise.
9238         * mips-linux-nat.c: Likewise.
9239         * ppc-linux-nat.c: Likewise.
9240         * s390-linux-nat.c: Likewise.
9241         * sparc64-linux-nat.c: Likewise.
9242         * x86-linux-nat.c: Likewise.
9243         * x86-linux-nat.h: Include "nat/x86-linux.h".
9244         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9245         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9246         Override methods.
9247
9248 2018-05-02  Pedro Alves  <palves@redhat.com>
9249
9250         * target.h (target_ops)
9251         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9252         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9253         stopped_by_watchpoint, have_continuable_watchpoint,
9254         stopped_data_address, watchpoint_addr_within_range,
9255         can_accel_watchpoint_condition, can_run, thread_alive,
9256         has_all_memory, has_memory, has_stack, has_registers,
9257         has_execution, can_async_p, is_async_p, supports_non_stop,
9258         always_non_stop_p, can_execute_reverse, supports_multi_process,
9259         supports_enable_disable_tracepoint,
9260         supports_disable_randomization, supports_string_tracing,
9261         supports_evaluation_of_breakpoint_conditions,
9262         can_run_breakpoint_commands, filesystem_is_local,
9263         can_download_tracepoint, get_trace_state_variable_value,
9264         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9265         record_is_replaying, record_will_replay,
9266         augmented_libraries_svr4_read>: Adjust to return bool.
9267         * aarch64-linux-nat.c: All implementations adjusted.
9268         * aix-thread.c: All implementations adjusted.
9269         * arm-linux-nat.c: All implementations adjusted.
9270         * breakpoint.c: All implementations adjusted.
9271         * bsd-kvm.c: All implementations adjusted.
9272         * bsd-uthread.c: All implementations adjusted.
9273         * corelow.c: All implementations adjusted.
9274         * ctf.c: All implementations adjusted.
9275         * darwin-nat.c: All implementations adjusted.
9276         * darwin-nat.h: All implementations adjusted.
9277         * exec.c: All implementations adjusted.
9278         * fbsd-nat.c: All implementations adjusted.
9279         * fbsd-nat.h: All implementations adjusted.
9280         * gnu-nat.c: All implementations adjusted.
9281         * gnu-nat.h: All implementations adjusted.
9282         * go32-nat.c: All implementations adjusted.
9283         * ia64-linux-nat.c: All implementations adjusted.
9284         * inf-child.c: All implementations adjusted.
9285         * inf-child.h: All implementations adjusted.
9286         * inf-ptrace.c: All implementations adjusted.
9287         * inf-ptrace.h: All implementations adjusted.
9288         * linux-nat.c: All implementations adjusted.
9289         * linux-nat.h: All implementations adjusted.
9290         * mips-linux-nat.c: All implementations adjusted.
9291         * nto-procfs.c: All implementations adjusted.
9292         * ppc-linux-nat.c: All implementations adjusted.
9293         * procfs.c: All implementations adjusted.
9294         * ravenscar-thread.c: All implementations adjusted.
9295         * record-btrace.c: All implementations adjusted.
9296         * record-full.c: All implementations adjusted.
9297         * remote-sim.c: All implementations adjusted.
9298         * remote.c: All implementations adjusted.
9299         * s390-linux-nat.c: All implementations adjusted.
9300         * sol-thread.c: All implementations adjusted.
9301         * spu-multiarch.c: All implementations adjusted.
9302         * target-delegates.c: All implementations adjusted.
9303         * target.c: All implementations adjusted.
9304         * target.h: All implementations adjusted.
9305         * tracefile-tfile.c: All implementations adjusted.
9306         * tracefile.c: All implementations adjusted.
9307         * tracefile.h: All implementations adjusted.
9308         * windows-nat.c: All implementations adjusted.
9309         * x86-linux-nat.h: All implementations adjusted.
9310         * x86-nat.h: All implementations adjusted.
9311
9312 2018-05-02  Pedro Alves  <palves@redhat.com>
9313
9314         * make-target-delegates (scan_target_h): Don't trim lines here.
9315         Replace sequences of tabs and/or whitespace with a single
9316         whitespace.
9317         (top level, parsing methods): Trim each line before processing it
9318         here.
9319
9320 2018-05-02  Pedro Alves  <palves@redhat.com>
9321             John Baldwin  <jhb@freebsd.org>
9322
9323         * target.h (enum strata) <debug_stratum>: New.
9324         (struct target_ops) <all delegation methods>: Replace by C++
9325         virtual methods, and drop "to_" prefix.  All references updated
9326         throughout.
9327         <to_shortname, to_longname, to_doc, to_data,
9328         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9329         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9330         virtual methods.  All references updated throughout.
9331         <can_attach, supports_terminal_ours, can_create_inferior,
9332         get_thread_control_capabilities, attach_no_wait>: New
9333         virtual methods.
9334         <insert_breakpoint, remove_breakpoint>: Now
9335         TARGET_DEFAULT_NORETURN methods.
9336         <info_proc>: Now returns bool.
9337         <to_magic>: Delete.
9338         (OPS_MAGIC): Delete.
9339         (current_target): Delete.  All references replaced by references
9340         to ...
9341         (target_stack): ... this.  New.
9342         (target_shortname, target_longname): Adjust.
9343         (target_can_run): Now a function declaration.
9344         (default_child_has_all_memory, default_child_has_memory)
9345         (default_child_has_stack, default_child_has_registers)
9346         (default_child_has_execution): Remove target_ops parameter.
9347         (complete_target_initialization): Delete.
9348         (memory_breakpoint_target): New template class.
9349         (test_target_ops): Refactor as a C++ class with virtual methods.
9350         * make-target-delegates (NAME_PART): Tighten.
9351         (POINTER_PART, CP_SYMBOL): New.
9352         (SIMPLE_RETURN_PART): Reimplement.
9353         (VEC_RETURN_PART): Expect less.
9354         (RETURN_PART, VIRTUAL_PART): New.
9355         (METHOD): Adjust to C++ virtual methods.
9356         (scan_target_h): Remove reference to C99.
9357         (dname): Output "target_ops::" prefix.
9358         (write_function_header): Adjust to output a C++ class method.
9359         (write_declaration): New.
9360         (write_delegator): Adjust to output a C++ class method.
9361         (tdname): Output "dummy_target::" prefix.
9362         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9363         method.
9364         (tdefault_names, debug_names): Delete.
9365         (return_types, tdefaults, styles, argtypes_array): New.
9366         (top level): All methods are delegators.
9367         (print_class): New.
9368         (top level): Print dummy_target and debug_target classes.
9369         * target-delegates.c: Regenerate.
9370         * target-debug.h (target_debug_print_enum_info_proc_what)
9371         (target_debug_print_thread_control_capabilities)
9372         (target_debug_print_thread_info_p): New.
9373         * target.c (dummy_target): Delete.
9374         (the_dummy_target, the_debug_target): New.
9375         (target_stack): Now extern.
9376         (set_targetdebug): Push/unpush debug target.
9377         (default_child_has_all_memory, default_child_has_memory)
9378         (default_child_has_stack, default_child_has_registers)
9379         (default_child_has_execution): Remove target_ops parameter.
9380         (complete_target_initialization): Delete.
9381         (add_target_with_completer): No longer call
9382         complete_target_initialization.
9383         (target_supports_terminal_ours): Use regular delegation.
9384         (update_current_target): Delete.
9385         (push_target): No longer check magic number.  Don't call
9386         update_current_target.
9387         (unpush_target): Don't call update_current_target.
9388         (target_is_pushed): No longer check magic number.
9389         (target_require_runnable): Skip for all stratums over
9390         process_stratum.
9391         (target_ops::info_proc): New.
9392         (target_info_proc): Use find_target_at and
9393         find_default_run_target.
9394         (target_supports_disable_randomization): Use regular delegation.
9395         (target_get_osdata): Use find_target_at.
9396         (target_ops::open, target_ops::close, target_ops::can_attach)
9397         (target_ops::attach, target_ops::can_create_inferior)
9398         (target_ops::create_inferior, target_ops::can_run)
9399         (target_can_run): New.
9400         (default_fileio_target): Use regular delegation.
9401         (target_ops::fileio_open, target_ops::fileio_pwrite)
9402         (target_ops::fileio_pread, target_ops::fileio_fstat)
9403         (target_ops::fileio_close, target_ops::fileio_unlink)
9404         (target_ops::fileio_readlink): New.
9405         (target_fileio_open_1, target_fileio_unlink)
9406         (target_fileio_readlink): Always call the target method.  Handle
9407         FILEIO_ENOSYS.
9408         (return_zero, return_zero_has_execution): Delete.
9409         (init_dummy_target): Delete.
9410         (dummy_target::dummy_target, dummy_target::shortname)
9411         (dummy_target::longname, dummy_target::doc)
9412         (debug_target::debug_target, debug_target::shortname)
9413         (debug_target::longname, debug_target::doc): New.
9414         (target_supports_delete_record): Use regular delegation.
9415         (setup_target_debug): Delete.
9416         (maintenance_print_target_stack): Skip debug_stratum.
9417         (initialize_targets): Instantiate the_dummy_target and
9418         the_debug_target.
9419         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9420         use target_stack.
9421         (target_auxv_search, fprint_target_auxv): Adjust.
9422         (info_auxv_command): Adjust to use target_stack.
9423         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9424         * exceptions.c (print_flush): Handle a NULL target_stack.
9425         * regcache.c (target_ops_no_register): Refactor as class with
9426         virtual methods.
9427
9428         * exec.c (exec_target): New class.
9429         (exec_ops): Now an exec_target.
9430         (exec_open, exec_close_1, exec_get_section_table)
9431         (exec_xfer_partial, exec_files_info, exec_has_memory)
9432         (exec_make_note_section): Refactor as exec_target methods.
9433         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9434         Delete.
9435         (exec_target::find_memory_regions): New.
9436         (_initialize_exec): Don't call init_exec_ops.
9437         * gdbcore.h (exec_file_clear): Delete.
9438
9439         * corefile.c (core_target): Delete.
9440         (core_file_command): Adjust.
9441         * corelow.c (core_target): New class.
9442         (the_core_target): New.
9443         (core_close): Remove target_ops parameter.
9444         (core_close_cleanup): Adjust.
9445         (core_target::close): New.
9446         (core_open, core_detach, get_core_registers, core_files_info)
9447         (core_xfer_partial, core_thread_alive, core_read_description)
9448         (core_pid_to_str, core_thread_name, core_has_memory)
9449         (core_has_stack, core_has_registers, core_info_proc): Rework as
9450         core_target methods.
9451         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9452         (_initialize_corelow): Initialize the_core_target.
9453         * gdbcore.h (core_target): Delete.
9454         (the_core_target): New.
9455
9456         * ctf.c: (ctf_target): New class.
9457         (ctf_ops): Now a ctf_target.
9458         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9459         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9460         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9461         methods.
9462         (init_ctf_ops): Delete.
9463         (_initialize_ctf): Don't call it.
9464         * tracefile-tfile.c (tfile_target): New class.
9465         (tfile_ops): Now a tfile_target.
9466         (tfile_open, tfile_close, tfile_files_info)
9467         (tfile_get_tracepoint_status, tfile_trace_find)
9468         (tfile_fetch_registers, tfile_xfer_partial)
9469         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9470         Refactor as tfile_target methods.
9471         (tfile_xfer_partial_features): Remove target_ops parameter.
9472         (init_tfile_ops): Delete.
9473         (_initialize_tracefile_tfile): Don't call it.
9474         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9475         (tracefile_has_stack, tracefile_has_registers)
9476         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9477         tracefile_target methods.
9478         (init_tracefile_ops): Delete.
9479         (tracefile_target::tracefile_target): New.
9480         * tracefile.h: Include "target.h".
9481         (tracefile_target): New class.
9482         (init_tracefile_ops): Delete.
9483
9484         * spu-multiarch.c (spu_multiarch_target): New class.
9485         (spu_ops): Now a spu_multiarch_target.
9486         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9487         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9488         (spu_search_memory, spu_mourn_inferior): Refactor as
9489         spu_multiarch_target methods.
9490         (init_spu_ops): Delete.
9491         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9492         complete_target_initialization.
9493
9494         * ravenscar-thread.c (ravenscar_thread_target): New class.
9495         (ravenscar_ops): Now a ravenscar_thread_target.
9496         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9497         (ravenscar_thread_alive, ravenscar_pid_to_str)
9498         (ravenscar_fetch_registers, ravenscar_store_registers)
9499         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9500         (ravenscar_stopped_by_hw_breakpoint)
9501         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9502         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9503         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9504         methods.
9505         (init_ravenscar_thread_ops): Delete.
9506         (_initialize_ravenscar): Remove references to
9507         init_ravenscar_thread_ops and complete_target_initialization.
9508
9509         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9510         (bsd_uthread_target): New class.
9511         (bsd_uthread_ops): Now a bsd_uthread_target.
9512         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9513         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9514         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9515         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9516         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9517         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9518         (bsd_uthread_target): Delete function.
9519         (_initialize_bsd_uthread): Remove reference to
9520         complete_target_initialization.
9521
9522         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9523         (target_bfd): ... this new class.
9524         (target_bfd_xfer_partial, target_bfd_get_section_table)
9525         (target_bfd_close): Refactor as target_bfd methods.
9526         (target_bfd::~target_bfd): New.
9527         (target_bfd_reopen): Adjust.
9528         (target_bfd::close): New.
9529
9530         * record-btrace.c (record_btrace_target): New class.
9531         (record_btrace_ops): Now a record_btrace_target.
9532         (record_btrace_open, record_btrace_stop_recording)
9533         (record_btrace_disconnect, record_btrace_close)
9534         (record_btrace_async, record_btrace_info)
9535         (record_btrace_insn_history, record_btrace_insn_history_range)
9536         (record_btrace_insn_history_from, record_btrace_call_history)
9537         (record_btrace_call_history_range)
9538         (record_btrace_call_history_from, record_btrace_record_method)
9539         (record_btrace_is_replaying, record_btrace_will_replay)
9540         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9541         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9542         (record_btrace_store_registers, record_btrace_prepare_to_store)
9543         (record_btrace_to_get_unwinder)
9544         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9545         (record_btrace_commit_resume, record_btrace_wait)
9546         (record_btrace_stop, record_btrace_can_execute_reverse)
9547         (record_btrace_stopped_by_sw_breakpoint)
9548         (record_btrace_supports_stopped_by_sw_breakpoint)
9549         (record_btrace_stopped_by_hw_breakpoint)
9550         (record_btrace_supports_stopped_by_hw_breakpoint)
9551         (record_btrace_update_thread_list, record_btrace_thread_alive)
9552         (record_btrace_goto_begin, record_btrace_goto_end)
9553         (record_btrace_goto, record_btrace_stop_replaying_all)
9554         (record_btrace_execution_direction)
9555         (record_btrace_prepare_to_generate_core)
9556         (record_btrace_done_generating_core): Refactor as
9557         record_btrace_target methods.
9558         (init_record_btrace_ops): Delete.
9559         (_initialize_record_btrace): Remove reference to
9560         init_record_btrace_ops.
9561         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9562         the execution_direction global.
9563         (record_full_base_target, record_full_target)
9564         (record_full_core_target): New classes.
9565         (record_full_ops): Now a record_full_target.
9566         (record_full_core_ops): Now a record_full_core_target.
9567         (record_full_target::detach, record_full_target::disconnect)
9568         (record_full_core_target::disconnect)
9569         (record_full_target::mourn_inferior, record_full_target::kill):
9570         New.
9571         (record_full_open, record_full_close, record_full_async): Refactor
9572         as methods of the record_full_base_target class.
9573         (record_full_resume, record_full_commit_resume): Refactor
9574         as methods of the record_full_target class.
9575         (record_full_wait, record_full_stopped_by_watchpoint)
9576         (record_full_stopped_data_address)
9577         (record_full_stopped_by_sw_breakpoint)
9578         (record_full_supports_stopped_by_sw_breakpoint)
9579         (record_full_stopped_by_hw_breakpoint)
9580         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9581         methods of the record_full_base_target class.
9582         (record_full_store_registers, record_full_xfer_partial)
9583         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9584         Refactor as methods of the record_full_target class.
9585         (record_full_can_execute_reverse, record_full_get_bookmark)
9586         (record_full_goto_bookmark, record_full_execution_direction)
9587         (record_full_record_method, record_full_info, record_full_delete)
9588         (record_full_is_replaying, record_full_will_replay)
9589         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9590         (record_full_stop_replaying): Refactor as methods of the
9591         record_full_base_target class.
9592         (record_full_core_resume, record_full_core_kill)
9593         (record_full_core_fetch_registers)
9594         (record_full_core_prepare_to_store)
9595         (record_full_core_store_registers, record_full_core_xfer_partial)
9596         (record_full_core_insert_breakpoint)
9597         (record_full_core_remove_breakpoint)
9598         (record_full_core_has_execution): Refactor
9599         as methods of the record_full_core_target class.
9600         (record_full_base_target::supports_delete_record): New.
9601         (init_record_full_ops): Delete.
9602         (init_record_full_core_ops): Delete.
9603         (record_full_save): Refactor as method of the
9604         record_full_base_target class.
9605         (_initialize_record_full): Remove references to
9606         init_record_full_ops and init_record_full_core_ops.
9607
9608         * remote.c (remote_target, extended_remote_target): New classes.
9609         (remote_ops): Now a remote_target.
9610         (extended_remote_ops): Now an extended_remote_target.
9611         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9612         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9613         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9614         (remote_pass_signals, remote_set_syscall_catchpoint)
9615         (remote_program_signals, )
9616         (remote_thread_always_alive): Remove target_ops parameter.
9617         (remote_thread_alive, remote_thread_name)
9618         (remote_update_thread_list, remote_threads_extra_info)
9619         (remote_static_tracepoint_marker_at)
9620         (remote_static_tracepoint_markers_by_strid)
9621         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9622         (remote_open): Refactor as methods of remote_target.
9623         (extended_remote_open, extended_remote_detach)
9624         (extended_remote_attach, extended_remote_post_attach):
9625         (extended_remote_supports_disable_randomization)
9626         (extended_remote_create_inferior): : Refactor as method of
9627         extended_remote_target.
9628         (remote_set_permissions, remote_open_1, remote_detach)
9629         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9630         (remote_resume, remote_commit_resume, remote_stop)
9631         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9632         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9633         (remote_prepare_to_store, remote_store_registers)
9634         (remote_flash_erase, remote_flash_done, remote_files_info)
9635         (remote_kill, remote_mourn, remote_insert_breakpoint)
9636         (remote_remove_breakpoint, remote_insert_watchpoint)
9637         (remote_watchpoint_addr_within_range)
9638         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9639         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9640         (remote_supports_stopped_by_sw_breakpoint)
9641         (remote_stopped_by_hw_breakpoint)
9642         (remote_supports_stopped_by_hw_breakpoint)
9643         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9644         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9645         (remote_verify_memory): Refactor as methods of remote_target.
9646         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9647         parameter.
9648         (remote_xfer_partial, remote_get_memory_xfer_limit)
9649         (remote_search_memory, remote_rcmd, remote_memory_map)
9650         (remote_pid_to_str, remote_get_thread_local_address)
9651         (remote_get_tib_address, remote_read_description): Refactor as
9652         methods of remote_target.
9653         (remote_target::fileio_open, remote_target::fileio_pwrite)
9654         (remote_target::fileio_pread, remote_target::fileio_close): New.
9655         (remote_hostio_readlink, remote_hostio_fstat)
9656         (remote_filesystem_is_local, remote_can_execute_reverse)
9657         (remote_supports_non_stop, remote_supports_disable_randomization)
9658         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9659         (remote_supports_enable_disable_tracepoint)
9660         (remote_supports_string_tracing)
9661         (remote_can_run_breakpoint_commands, remote_trace_init)
9662         (remote_download_tracepoint, remote_can_download_tracepoint)
9663         (remote_download_trace_state_variable, remote_enable_tracepoint)
9664         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9665         (remote_trace_start, remote_get_trace_status)
9666         (remote_get_tracepoint_status, remote_trace_stop)
9667         (remote_trace_find, remote_get_trace_state_variable_value)
9668         (remote_save_trace_data, remote_get_raw_trace_data)
9669         (remote_set_disconnected_tracing, remote_core_of_thread)
9670         (remote_set_circular_trace_buffer, remote_traceframe_info)
9671         (remote_get_min_fast_tracepoint_insn_len)
9672         (remote_set_trace_buffer_size, remote_set_trace_notes)
9673         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9674         (remote_disable_btrace, remote_teardown_btrace)
9675         (remote_read_btrace, remote_btrace_conf)
9676         (remote_augmented_libraries_svr4_read, remote_load)
9677         (remote_pid_to_exec_file, remote_can_do_single_step)
9678         (remote_execution_direction, remote_thread_handle_to_thread_info):
9679         Refactor as methods of remote_target.
9680         (init_remote_ops, init_extended_remote_ops): Delete.
9681         (remote_can_async_p, remote_is_async_p, remote_async)
9682         (remote_thread_events, remote_upload_tracepoints)
9683         (remote_upload_trace_state_variables): Refactor as methods of
9684         remote_target.
9685         (_initialize_remote): Remove references to init_remote_ops and
9686         init_extended_remote_ops.
9687
9688         * remote-sim.c (gdbsim_target): New class.
9689         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9690         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9691         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9692         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9693         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9694         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9695         Refactor as methods of gdbsim_target.
9696         (gdbsim_ops): Now a gdbsim_target.
9697         (init_gdbsim_ops): Delete.
9698         (gdbsim_cntrl_c): Adjust.
9699         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9700
9701         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9702         (the_amd64_linux_nat_target): New.
9703         (amd64_linux_fetch_inferior_registers)
9704         (amd64_linux_store_inferior_registers): Refactor as methods of
9705         amd64_linux_nat_target.
9706         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9707         * i386-linux-nat.c: Don't include "linux-nat.h".
9708         (i386_linux_nat_target): New class.
9709         (the_i386_linux_nat_target): New.
9710         (i386_linux_fetch_inferior_registers)
9711         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9712         as methods of i386_linux_nat_target.
9713         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9714         * inf-child.c (inf_child_ops): Delete.
9715         (inf_child_fetch_inferior_registers)
9716         (inf_child_store_inferior_registers): Delete.
9717         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9718         methods of inf_child_target.
9719         (inf_child_target::supports_terminal_ours)
9720         (inf_child_target::terminal_init)
9721         (inf_child_target::terminal_inferior)
9722         (inf_child_target::terminal_ours_for_output)
9723         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9724         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9725         New.
9726         (inf_child_open, inf_child_disconnect, inf_child_close)
9727         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9728         (inf_child_post_startup_inferior, inf_child_can_run)
9729         (inf_child_pid_to_exec_file): Refactor as methods of
9730         inf_child_target.
9731         (inf_child_follow_fork): Delete.
9732         (inf_child_target::can_create_inferior)
9733         (inf_child_target::can_attach): New.
9734         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9735         (inf_child_target::has_stack, inf_child_target::has_registers)
9736         (inf_child_target::has_execution): New.
9737         (inf_child_fileio_open, inf_child_fileio_pwrite)
9738         (inf_child_fileio_pread, inf_child_fileio_fstat)
9739         (inf_child_fileio_close, inf_child_fileio_unlink)
9740         (inf_child_fileio_readlink, inf_child_use_agent)
9741         (inf_child_can_use_agent): Refactor as methods of
9742         inf_child_target.
9743         (return_zero, inf_child_target): Delete.
9744         (inf_child_target::inf_child_target): New.
9745         * inf-child.h: Include "target.h".
9746         (inf_child_target): Delete function prototype.
9747         (inf_child_target): New class.
9748         (inf_child_open_target, inf_child_mourn_inferior)
9749         (inf_child_maybe_unpush_target): Delete.
9750         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9751         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9752         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9753         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9754         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9755         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9756         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9757         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9758         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9759         methods of inf_ptrace_target.
9760         (inf_ptrace_target): Delete function.
9761         * inf-ptrace.h: Include "inf-child.h".
9762         (inf_ptrace_target): Delete function declaration.
9763         (inf_ptrace_target): New class.
9764         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9765         * linux-nat.c (linux_target): New.
9766         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9767         (linux_nat_target::~linux_nat_target): New.
9768         (linux_child_post_attach, linux_child_post_startup_inferior)
9769         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9770         (linux_child_remove_fork_catchpoint)
9771         (linux_child_insert_vfork_catchpoint)
9772         (linux_child_remove_vfork_catchpoint)
9773         (linux_child_insert_exec_catchpoint)
9774         (linux_child_remove_exec_catchpoint)
9775         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9776         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9777         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9778         (linux_nat_stopped_data_address)
9779         (linux_nat_stopped_by_sw_breakpoint)
9780         (linux_nat_supports_stopped_by_sw_breakpoint)
9781         (linux_nat_stopped_by_hw_breakpoint)
9782         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9783         (linux_nat_kill, linux_nat_mourn_inferior)
9784         (linux_nat_xfer_partial, linux_nat_thread_alive)
9785         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9786         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9787         (linux_child_static_tracepoint_markers_by_strid)
9788         (linux_nat_is_async_p, linux_nat_can_async_p)
9789         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9790         (linux_nat_supports_multi_process)
9791         (linux_nat_supports_disable_randomization, linux_nat_async)
9792         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9793         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9794         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9795         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9796         methods of linux_nat_target.
9797         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9798         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9799         parameter.
9800         (check_stopped_by_watchpoint): Adjust.
9801         (linux_xfer_partial): Delete.
9802         (linux_target_install_ops, linux_target, linux_nat_add_target):
9803         Delete.
9804         (linux_nat_target::linux_nat_target): New.
9805         * linux-nat.h: Include "inf-ptrace.h".
9806         (linux_nat_target): New.
9807         (linux_target, linux_target_install_ops, linux_nat_add_target):
9808         Delete function declarations.
9809         (linux_target): Declare global.
9810         * linux-thread-db.c (thread_db_target): New.
9811         (thread_db_target::thread_db_target): New.
9812         (thread_db_ops): Delete.
9813         (the_thread_db_target): New.
9814         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9815         (thread_db_update_thread_list, thread_db_pid_to_str)
9816         (thread_db_extra_thread_info)
9817         (thread_db_thread_handle_to_thread_info)
9818         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9819         (thread_db_resume): Refactor as methods of thread_db_target.
9820         (init_thread_db_ops): Delete.
9821         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9822         * x86-linux-nat.c: Don't include "linux-nat.h".
9823         (super_post_startup_inferior): Delete.
9824         (x86_linux_nat_target::~x86_linux_nat_target): New.
9825         (x86_linux_child_post_startup_inferior)
9826         (x86_linux_read_description, x86_linux_enable_btrace)
9827         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9828         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9829         methods of x86_linux_nat_target.
9830         (x86_linux_create_target): Delete.  Bits folded ...
9831         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9832         pointer.
9833         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9834         (x86_linux_nat_target): New class.
9835         (x86_linux_create_target): Delete.
9836         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9837         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9838         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9839         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9840         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9841         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9842         make extern.
9843         (x86_use_watchpoints): Delete.
9844         * x86-nat.h: Include "breakpoint.h" and "target.h".
9845         (x86_use_watchpoints): Delete.
9846         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9847         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9848         (x86_insert_watchpoint, x86_remove_watchpoint)
9849         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9850         (x86_stopped_by_hw_breakpoint): New declarations.
9851         (x86_nat_target): New template class.
9852
9853         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9854         (the_ppc_linux_nat_target): New.
9855         (ppc_linux_fetch_inferior_registers)
9856         (ppc_linux_can_use_hw_breakpoint)
9857         (ppc_linux_region_ok_for_hw_watchpoint)
9858         (ppc_linux_ranged_break_num_registers)
9859         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9860         (ppc_linux_insert_mask_watchpoint)
9861         (ppc_linux_remove_mask_watchpoint)
9862         (ppc_linux_can_accel_watchpoint_condition)
9863         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9864         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9865         (ppc_linux_watchpoint_addr_within_range)
9866         (ppc_linux_masked_watch_num_registers)
9867         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9868         (ppc_linux_read_description): Refactor as methods of
9869         ppc_linux_nat_target.
9870         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9871
9872         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9873         (procfs_target): New class.
9874         (the_procfs_target): New.
9875         (procfs_target): Delete function.
9876         (procfs_auxv_parse, procfs_attach, procfs_detach)
9877         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9878         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9879         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9880         (procfs_create_inferior, procfs_update_thread_list)
9881         (procfs_thread_alive, procfs_pid_to_str)
9882         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9883         (procfs_stopped_data_address, procfs_insert_watchpoint)
9884         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9885         (proc_find_memory_regions, procfs_info_proc)
9886         (procfs_make_note_section): Refactor as methods of procfs_target.
9887         (_initialize_procfs): Adjust.
9888         * sol-thread.c (sol_thread_target): New class.
9889         (sol_thread_ops): Now a sol_thread_target.
9890         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9891         (sol_thread_fetch_registers, sol_thread_store_registers)
9892         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9893         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9894         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9895         (init_sol_thread_ops): Delete.
9896         (_initialize_sol_thread): Adjust.  Remove references to
9897         init_sol_thread_ops and complete_target_initialization.
9898
9899         * windows-nat.c (windows_nat_target): New class.
9900         (windows_fetch_inferior_registers)
9901         (windows_store_inferior_registers, windows_resume, windows_wait)
9902         (windows_attach, windows_detach, windows_pid_to_exec_file)
9903         (windows_files_info, windows_create_inferior)
9904         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9905         (windows_close, windows_pid_to_str, windows_xfer_partial)
9906         (windows_get_tib_address, windows_get_ada_task_ptid)
9907         (windows_thread_name, windows_thread_alive): Refactor as
9908         windows_nat_target methods.
9909         (do_initial_windows_stuff): Adjust.
9910         (windows_target): Delete function.
9911         (_initialize_windows_nat): Adjust.
9912
9913         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9914         (darwin_mourn_inferior, darwin_kill_inferior)
9915         (darwin_create_inferior, darwin_attach, darwin_detach)
9916         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9917         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9918         (darwin_supports_multi_process): Refactor as darwin_nat_target
9919         methods.
9920         (darwin_resume_to, darwin_files_info): Delete.
9921         (_initialize_darwin_inferior): Rename to ...
9922         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9923         * darwin-nat.h: Include "inf-child.h".
9924         (darwin_nat_target): New class.
9925         (darwin_complete_target): Delete.
9926         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9927         (darwin_target): New.
9928         (i386_darwin_fetch_inferior_registers)
9929         (i386_darwin_store_inferior_registers): Refactor as methods of
9930         darwin_nat_target.
9931         (darwin_complete_target): Delete, with ...
9932         (_initialize_i386_darwin_nat): ... bits factored out here.
9933
9934         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9935         (the_alpha_linux_nat_target): New.
9936         (alpha_linux_register_u_offset): Refactor as
9937         alpha_linux_nat_target method.
9938         (_initialize_alpha_linux_nat): Adjust.
9939         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9940         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9941         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9942         methods of linux_nat_trad_target.
9943         (linux_trad_target): Delete.
9944         * linux-nat-trad.h (linux_trad_target): Delete function.
9945         (linux_nat_trad_target): New class.
9946         * mips-linux-nat.c (mips_linux_nat_target): New class.
9947         (super_fetch_registers, super_store_registers, super_close):
9948         Delete.
9949         (the_mips_linux_nat_target): New.
9950         (mips64_linux_regsets_fetch_registers)
9951         (mips64_linux_regsets_store_registers)
9952         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9953         (mips_linux_register_u_offset, mips_linux_read_description)
9954         (mips_linux_can_use_hw_breakpoint)
9955         (mips_linux_stopped_by_watchpoint)
9956         (mips_linux_stopped_data_address)
9957         (mips_linux_region_ok_for_hw_watchpoint)
9958         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9959         (mips_linux_close): Refactor as methods of mips_linux_nat.
9960         (_initialize_mips_linux_nat): Adjust to C++ification.
9961
9962         * aix-thread.c (aix_thread_target): New class.
9963         (aix_thread_ops): Now an aix_thread_target.
9964         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9965         (aix_thread_fetch_registers, aix_thread_store_registers)
9966         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9967         (aix_thread_thread_alive, aix_thread_pid_to_str)
9968         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9969         Refactor as methods of aix_thread_target.
9970         (init_aix_thread_ops): Delete.
9971         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9972         and complete_target_initialization.
9973         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9974         (rs6000_nat_target): New class.
9975         (the_rs6000_nat_target): New.
9976         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9977         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9978         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9979         (super_create_inferior): Delete.
9980         (_initialize_rs6000_nat): Adjust to C++ification.
9981
9982         * arm-linux-nat.c (arm_linux_nat_target): New class.
9983         (the_arm_linux_nat_target): New.
9984         (arm_linux_fetch_inferior_registers)
9985         (arm_linux_store_inferior_registers, arm_linux_read_description)
9986         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9987         (arm_linux_remove_hw_breakpoint)
9988         (arm_linux_region_ok_for_hw_watchpoint)
9989         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9990         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9991         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9992         arm_linux_nat_target.
9993         (_initialize_arm_linux_nat): Adjust to C++ification.
9994
9995         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9996         (the_aarch64_linux_nat_target): New.
9997         (aarch64_linux_fetch_inferior_registers)
9998         (aarch64_linux_store_inferior_registers)
9999         (aarch64_linux_child_post_startup_inferior)
10000         (aarch64_linux_read_description)
10001         (aarch64_linux_can_use_hw_breakpoint)
10002         (aarch64_linux_insert_hw_breakpoint)
10003         (aarch64_linux_remove_hw_breakpoint)
10004         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10005         (aarch64_linux_region_ok_for_hw_watchpoint)
10006         (aarch64_linux_stopped_data_address)
10007         (aarch64_linux_stopped_by_watchpoint)
10008         (aarch64_linux_watchpoint_addr_within_range)
10009         (aarch64_linux_can_do_single_step): Refactor as methods of
10010         aarch64_linux_nat_target.
10011         (super_post_startup_inferior): Delete.
10012         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10013
10014         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10015         (the_hppa_linux_nat_target): New.
10016         (hppa_linux_fetch_inferior_registers)
10017         (hppa_linux_store_inferior_registers): Refactor as methods of
10018         hppa_linux_nat_target.
10019         (_initialize_hppa_linux_nat): Adjust to C++ification.
10020
10021         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10022         (the_ia64_linux_nat_target): New.
10023         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10024         (ia64_linux_stopped_data_address)
10025         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10026         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10027         ia64_linux_nat_target methods.
10028         (super_xfer_partial): Delete.
10029         (_initialize_ia64_linux_nat): Adjust to C++ification.
10030
10031         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10032         (the_m32r_linux_nat_target): New.
10033         (m32r_linux_fetch_inferior_registers)
10034         (m32r_linux_store_inferior_registers): Refactor as
10035         m32r_linux_nat_target methods.
10036         (_initialize_m32r_linux_nat): Adjust to C++ification.
10037
10038         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10039         (the_m68k_linux_nat_target): New.
10040         (m68k_linux_fetch_inferior_registers)
10041         (m68k_linux_store_inferior_registers): Refactor as
10042         m68k_linux_nat_target methods.
10043         (_initialize_m68k_linux_nat): Adjust to C++ification.
10044
10045         * s390-linux-nat.c (s390_linux_nat_target): New class.
10046         (the_s390_linux_nat_target): New.
10047         (s390_linux_fetch_inferior_registers)
10048         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10049         (s390_insert_watchpoint, s390_remove_watchpoint)
10050         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10051         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10052         (s390_auxv_parse, s390_read_description): Refactor as methods of
10053         s390_linux_nat_target.
10054         (_initialize_s390_nat): Adjust to C++ification.
10055
10056         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10057         (the_sparc_linux_nat_target): New.
10058         (_initialize_sparc_linux_nat): Adjust to C++ification.
10059         * sparc-nat.c (sparc_fetch_inferior_registers)
10060         (sparc_store_inferior_registers): Remove target_ops parameter.
10061         * sparc-nat.h (sparc_fetch_inferior_registers)
10062         (sparc_store_inferior_registers): Remove target_ops parameter.
10063         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10064         (the_sparc64_linux_nat_target): New.
10065         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10066
10067         * spu-linux-nat.c (spu_linux_nat_target): New class.
10068         (the_spu_linux_nat_target): New.
10069         (spu_child_post_startup_inferior, spu_child_post_attach)
10070         (spu_child_wait, spu_fetch_inferior_registers)
10071         (spu_store_inferior_registers, spu_xfer_partial)
10072         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10073         methods.
10074         (_initialize_spu_nat): Adjust to C++ification.
10075
10076         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10077         (the_tilegx_linux_nat_target): New.
10078         (fetch_inferior_registers, store_inferior_registers):
10079         Refactor as methods.
10080         (_initialize_tile_linux_nat): Adjust to C++ification.
10081
10082         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10083         (the_xtensa_linux_nat_target): New.
10084         (xtensa_linux_fetch_inferior_registers)
10085         (xtensa_linux_store_inferior_registers): Refactor as
10086         xtensa_linux_nat_target methods.
10087         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10088
10089         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10090         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10091         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10092         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10093         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10094         (fbsd_stopped_by_sw_breakpoint)
10095         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10096         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10097         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10098         (fbsd_post_startup_inferior, fbsd_post_attach)
10099         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10100         (fbsd_set_syscall_catchpoint)
10101         (super_xfer_partial, super_resume, super_wait)
10102         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10103         (fbsd_handle_debug_trap): Remove target_ops parameter.
10104         (fbsd_nat_add_target): Delete.
10105         * fbsd-nat.h: Include "inf-ptrace.h".
10106         (fbsd_nat_add_target): Delete.
10107         (USE_SIGTRAP_SIGINFO): Define.
10108         (fbsd_nat_target): New class.
10109
10110         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10111         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10112         (amd64bsd_target): Delete.
10113         * amd64-bsd-nat.h: New file.
10114         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10115         "x86-bsd-nat.h".
10116         (amd64_fbsd_nat_target): New class.
10117         (the_amd64_fbsd_nat_target): New.
10118         (amd64fbsd_read_description): Refactor as method of
10119         amd64_fbsd_nat_target.
10120         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10121         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10122         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10123         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10124         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10125         (i386bsd_target): Delete.
10126         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10127         (i386bsd_fetch_inferior_registers)
10128         (i386bsd_store_inferior_registers): Declare.
10129         (i386_bsd_nat_target): New class.
10130         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10131         (the_i386_fbsd_nat_target): New.
10132         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10133         i386_fbsd_nat_target methods.
10134         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10135         (_initialize_i386fbsd_nat): Adjust to C++ification.
10136         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10137         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10138         (_initialize_x86_bsd_nat): Adjust to C++ification.
10139         * x86-bsd-nat.h: Include "x86-nat.h".
10140         (x86bsd_target): Delete declaration.
10141         (x86bsd_nat_target): New class.
10142
10143         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10144         (the_aarch64_fbsd_nat_target): New.
10145         (aarch64_fbsd_fetch_inferior_registers)
10146         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10147         aarch64_fbsd_nat_target.
10148         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10149         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10150         (the_alpha_bsd_nat_target): New.
10151         (alphabsd_fetch_inferior_registers)
10152         (alphabsd_store_inferior_registers): Refactor as
10153         alpha_bsd_nat_target methods.
10154         (_initialize_alphabsd_nat): Refactor as methods of
10155         alpha_bsd_nat_target.
10156         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10157         (the_amd64_nbsd_nat_target): New.
10158         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10159         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10160         (the_amd64_obsd_nat_target): New.
10161         (_initialize_amd64obsd_nat): Adjust to C++ification.
10162         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10163         (the_arm_fbsd_nat_target): New.
10164         (arm_fbsd_fetch_inferior_registers)
10165         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10166         (_initialize_arm_fbsd_nat): Refactor as methods of
10167         arm_fbsd_nat_target.
10168         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10169         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10170         (the_arm_netbsd_nat_target): New.
10171         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10172         arm_netbsd_nat_target.
10173         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10174         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10175         (the_hppa_nbsd_nat_target): New.
10176         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10177         hppa_nbsd_nat_target methods.
10178         (_initialize_hppanbsd_nat): Adjust to C++ification.
10179         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10180         (the_hppa_obsd_nat_target): New.
10181         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10182         methods of hppa_obsd_nat_target.
10183         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10184         add_target.
10185         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10186         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10187         add_target.
10188         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10189         (_initialize_i386obsd_nat): Use add_target.
10190         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10191         (the_m68k_bsd_nat_target): New.
10192         (m68kbsd_fetch_inferior_registers)
10193         (m68kbsd_store_inferior_registers): Refactor as methods of
10194         m68k_bsd_nat_target.
10195         (_initialize_m68kbsd_nat): Adjust to C++ification.
10196         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10197         (the_mips_fbsd_nat_target): New.
10198         (mips_fbsd_fetch_inferior_registers)
10199         (mips_fbsd_store_inferior_registers): Refactor as methods of
10200         mips_fbsd_nat_target.
10201         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10202         add_target.
10203         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10204         (the_mips_nbsd_nat_target): New.
10205         (mipsnbsd_fetch_inferior_registers)
10206         (mipsnbsd_store_inferior_registers): Refactor as methods of
10207         mips_nbsd_nat_target.
10208         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10209         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10210         (the_mips64_obsd_nat_target): New.
10211         (mips64obsd_fetch_inferior_registers)
10212         (mips64obsd_store_inferior_registers): Refactor as methods of
10213         mips64_obsd_nat_target.
10214         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10215         add_target.
10216         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10217         nbsd_nat_target.
10218         * nbsd-nat.h: Include "inf-ptrace.h".
10219         (nbsd_nat_target): New class.
10220         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10221         (obsd_wait): Refactor as methods of obsd_nat_target.
10222         (obsd_add_target): Delete.
10223         * obsd-nat.h: Include "inf-ptrace.h".
10224         (obsd_nat_target): New class.
10225         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10226         (the_ppc_fbsd_nat_target): New.
10227         (ppcfbsd_fetch_inferior_registers)
10228         (ppcfbsd_store_inferior_registers): Refactor as methods of
10229         ppc_fbsd_nat_target.
10230         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10231         add_target.
10232         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10233         (the_ppc_nbsd_nat_target): New.
10234         (ppcnbsd_fetch_inferior_registers)
10235         (ppcnbsd_store_inferior_registers): Refactor as methods of
10236         ppc_nbsd_nat_target.
10237         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10238         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10239         (the_ppc_obsd_nat_target): New.
10240         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10241         methods of ppc_obsd_nat_target.
10242         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10243         add_target.
10244         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10245         (the_sh_nbsd_nat_target): New.
10246         (shnbsd_fetch_inferior_registers)
10247         (shnbsd_store_inferior_registers): Refactor as methods of
10248         sh_nbsd_nat_target.
10249         (_initialize_shnbsd_nat): Adjust to C++ification.
10250         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10251         (inf_ptrace_xfer_partial): Delete.
10252         (sparc_xfer_partial, sparc_target): Delete.
10253         * sparc-nat.h (sparc_fetch_inferior_registers)
10254         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10255         (sparc_target): Delete function declaration.
10256         (sparc_target): New template class.
10257         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10258         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10259         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10260         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10261         add_target.
10262         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10263         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10264         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10265         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10266         add_target.
10267         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10268         (the_vax_bsd_nat_target): New.
10269         (vaxbsd_fetch_inferior_registers)
10270         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10271         methods.
10272         (_initialize_vaxbsd_nat): Adjust to C++ification.
10273
10274         * bsd-kvm.c (bsd_kvm_target): New class.
10275         (bsd_kvm_ops): Now a bsd_kvm_target.
10276         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10277         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10278         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10279         bsd_kvm_target.
10280         (bsd_kvm_return_one): Delete.
10281         (bsd_kvm_add_target): Adjust to C++ification.
10282
10283         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10284         (nto_procfs_target_procfs): New classes.
10285         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10286         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10287         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10288         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10289         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10290         (procfs_remove_hw_breakpoint, procfs_resume)
10291         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10292         (procfs_kill_inferior, procfs_store_registers)
10293         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10294         as methods of nto_procfs_target.
10295         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10296         (nto_native_ops): Delete.
10297         (procfs_open, procfs_native_open): Delete.
10298         (nto_native_ops): Now an nto_procfs_target_native.
10299         (init_procfs_targets): Adjust to C++ification.
10300         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10301         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10302         Refactor as methods of nto_procfs_target.
10303
10304         * go32-nat.c (go32_nat_target): New class.
10305         (the_go32_nat_target): New.
10306         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10307         (go32_store_registers, go32_xfer_partial, go32_files_info)
10308         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10309         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10310         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10311         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10312         (go32_target): Delete.
10313         (_initialize_go32_nat): Adjust to C++ification.
10314
10315         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10316         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10317         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10318         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10319         gnu_nat_target.
10320         (gnu_target): Delete.
10321         * gnu-nat.h (gnu_target): Delete.
10322         (gnu_nat_target): New class.
10323         * i386-gnu-nat.c (gnu_base_target): New.
10324         (i386_gnu_nat_target): New class.
10325         (the_i386_gnu_nat_target): New.
10326         (_initialize_i386gnu_nat): Adjust to C++ification.
10327
10328 2018-05-02  Pedro Alves  <palves@redhat.com>
10329
10330         * bfd-target.c (target_bfd_xclose): Rename to ...
10331         (target_bfd_close): ... this.
10332         (target_bfd_reopen): Adjust.
10333         * target.c (target_close): Remove references to to_xclose.
10334         * target.h (target_ops::to_xclose): Delete.
10335         (target_ops::to_close): Update comments.
10336
10337 2018-05-02  Pedro Alves  <palves@redhat.com>
10338
10339         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10340         "linux-nat.h".
10341         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10342         * inf-ptrace.c (inf_ptrace_register_u_offset)
10343         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10344         (inf_ptrace_store_register, inf_ptrace_store_registers)
10345         (inf_ptrace_trad_target): Move to ...
10346         * linux-nat-trad.c: ... this new file.
10347         * linux-nat-trad.h: New file.
10348         * linux-nat.c (linux_target_install_ops): Make extern.
10349         (linux_trad_target): Delete.
10350         * linux-nat.h (linux_trad_target): Delete declaration.
10351         (linux_target_install_ops): Declare.
10352         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10353         "linux-nat.h".
10354
10355 2018-05-02  Pedro Alves  <palves@redhat.com>
10356
10357         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10358         procfs_target/add_target here.
10359         * procfs.c (procfs_target): Make static.
10360         (_initialize_procfs): Call add_target here.
10361         * procfs.h (struct target_ops): Remove forward declaration.
10362         (procfs_target): Remove declaration.
10363         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10364
10365 2018-05-02  Pedro Alves  <palves@redhat.com>
10366
10367         * procfs.c (procfs_stopped_by_watchpoint)
10368         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10369         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10370         Forward declare.
10371         (procfs_use_watchpoints): Delete, move contents...
10372         (procfs_target): ... here.
10373         * procfs.h (procfs_use_watchpoints): Delete declaration.
10374         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10375         procfs_use_watchpoints.
10376         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10377         procfs_use_watchpoints.
10378
10379 2018-05-02  Tom Tromey  <tom@tromey.com>
10380
10381         PR python/20084:
10382         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10383         and var_zuinteger_unlimited.
10384         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10385         and PARAM_ZUINTEGER_UNLIMITED.
10386         (set_parameter_value): Handle var_zuinteger and
10387         var_zuinteger_unlimited.
10388         (add_setshow_generic): Likewise.
10389         (parmpy_init): Likewise.
10390
10391 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10392
10393         PR rust/23124
10394         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10395         pointer is not null before dereferencing it.
10396
10397 2018-04-30  Tom Tromey  <tom@tromey.com>
10398
10399         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10400         is_mi_like_p.
10401
10402 2018-04-30  Tom Tromey  <tom@tromey.com>
10403
10404         * breakpoint.c (mention): Remove use of is_mi_like_p.
10405         (print_mention_ranged_breakpoint): Likewise.
10406         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10407         of is_mi_like_p.
10408
10409 2018-04-30  Tom Tromey  <tom@tromey.com>
10410
10411         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10412
10413 2018-04-30  Tom Tromey  <tom@tromey.com>
10414
10415         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10416         (info_spu_event_command): Remove some uses of is_mi_like_p.
10417
10418 2018-04-30  Tom Tromey  <tom@tromey.com>
10419
10420         * python/py-framefilter.c (py_print_single_arg)
10421         (enumerate_locals, py_print_args, py_print_frame): Remove some
10422         uses of is_mi_like_p.
10423
10424 2018-04-30  Tom Tromey  <tom@tromey.com>
10425
10426         * ui-out.c: Update.
10427         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10428         * ui-out.h (ui_out::is_mi_like_p): Now const.
10429         (ui_out::do_is_mi_like_p): Now const.
10430         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10431
10432 2018-04-30  Tom Tromey  <tom@tromey.com>
10433
10434         * varobj.c (varobj_set_visualizer): Use new_reference.
10435         * python/python.c (gdbpy_decode_line): Use new_reference.
10436         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10437         new_reference.
10438
10439 2018-04-30  Tom Tromey  <tom@tromey.com>
10440
10441         * varobj.c (install_new_value): Use new_reference.
10442         * value.h (value_incref): Return void.  Swap intro comment with
10443         value_decref.
10444         * value.c (set_value_parent): Use new_reference.
10445         (value_incref): Return void.  Update intro comment.
10446         (release_value): Use new_reference.
10447         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10448
10449 2018-04-30  Tom Tromey  <tom@tromey.com>
10450
10451         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10452         * gdb_bfd.h (new_bfd_ref): Remove.
10453         (gdb_bfd_open): Update comment.
10454         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10455         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10456         (gdb_bfd_fdopenr): Use new_reference.
10457         * exec.c (exec_file_attach): Use new_reference.
10458
10459 2018-04-30  Tom Tromey  <tom@tromey.com>
10460
10461         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10462         method.
10463
10464 2018-04-30  Tom Tromey  <tom@tromey.com>
10465
10466         * jit.c (jit_read_code_entry): Use type_align.
10467         * i386-tdep.c (i386_gdbarch_init): Don't call
10468         set_gdbarch_long_long_align_bit.
10469         * gdbarch.sh: Remove long_long_align_bit.
10470         * gdbarch.c, gdbarch.h: Rebuild.
10471         * arc-tdep.c (arc_type_align): New function.
10472         (arc_gdbarch_init): Use arc_type_align.  Don't call
10473         set_gdbarch_long_long_align_bit.
10474
10475 2018-04-30  Tom Tromey  <tom@tromey.com>
10476
10477         * rust-lang.c (rust_type_alignment): Remove.
10478         (rust_composite_type): Use type_align.
10479
10480 2018-04-30  Tom Tromey  <tom@tromey.com>
10481
10482         * NEWS: Mention Type.align.
10483         * python/py-type.c (typy_get_alignof): New function.
10484         (type_object_getset): Add "alignof".
10485
10486 2018-04-30  Tom Tromey  <tom@tromey.com>
10487
10488         PR exp/17095:
10489         * NEWS: Update.
10490         * std-operator.def (UNOP_ALIGNOF): New operator.
10491         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10492         New.
10493         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10494         * c-lang.c (c_op_print_tab): Add alignof.
10495         * c-exp.y (ALIGNOF): New token.
10496         (exp): Add "ALIGNOF" production.
10497         (ident_tokens): Add _Alignof and alignof.
10498
10499 2018-04-30  Tom Tromey  <tom@tromey.com>
10500
10501         * i386-tdep.c (i386_type_align): New function.
10502         (i386_gdbarch_init): Update.
10503         * gdbarch.sh (type_align): New method.
10504         * gdbarch.c, gdbarch.h: Rebuild.
10505         * arch-utils.h (default_type_align): Declare.
10506         * arch-utils.c (default_type_align): New function.
10507         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10508         (struct type) <align_log2>: New field.
10509         <instance_flags>: Now a bitfield.
10510         (TYPE_RAW_ALIGN): New macro.
10511         (type_align, type_raw_align, set_type_align): Declare.
10512         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10513         functions.
10514         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10515         (get_alignment, maybe_set_alignment): New functions.
10516         (read_structure_type, read_enumeration_type, read_array_type)
10517         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10518         (read_subrange_type, read_base_type): Set type alignment.
10519
10520 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10521
10522         * dwarf2read.c (read_index_from_section): Use bool.
10523
10524 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10525
10526         PR gdb/22950
10527         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10528         with #ifdef.
10529
10530 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10531
10532         PR build/22873
10533         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10534         last step, and do it atomically.
10535
10536 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10537
10538         * compile/compile-c-types.c (convert_int, convert_float):
10539         Update for C FE v1.
10540
10541 2018-04-27  Tom Tromey  <tom@tromey.com>
10542
10543         PR rust/22545:
10544         * rust-lang.c (rust_inclusive_range_type_p): New function.
10545         (rust_range): Handle inclusive ranges.
10546         (rust_compute_range): Likewise.
10547         * rust-exp.y (struct rust_op) <inclusive>: New field.
10548         (DOTDOTEQ): New constant.
10549         (range_expr): Add "..=" productions.
10550         (operator_tokens): Add "..=" token.
10551         (ast_range): Add "inclusive" parameter.
10552         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10553         ranges.
10554         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10555         bounds values.
10556         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10557         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10558         Update comments.
10559         * expprint.c (print_subexp_standard): Handle new bounds values.
10560         (dump_subexp_body_standard): Likewise.
10561
10562 2018-04-27  Tom Tromey  <tom@tromey.com>
10563
10564         * configure: Rebuild.
10565         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10566         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10567         "OVERRIDE".
10568         (class symbol_needs_eval_context): Likewise.
10569         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10570         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10571         "virtual".
10572         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10573         "override".
10574         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10575         * aarch64-tdep.c (instruction_reader::read): Use "override".
10576         (instruction_reader_test::read): Likewise.
10577         * arm-tdep.c (instruction_reader::read): Use "override".
10578         (instruction_reader_thumb::read): Likewise.
10579
10580 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10581
10582         PR remote/9665
10583         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10584         instead of remote_send.
10585         (remote_send): Remove.
10586
10587 2018-04-26  Pedro Alves  <palves@redhat.com>
10588
10589         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10590         find_function_start_sal instead of find_pc_line.
10591
10592 2018-04-26  Pedro Alves  <palves@redhat.com>
10593
10594         * breakpoint.c (set_breakpoint_location_function): Handle
10595         mst_data_gnu_ifunc.
10596         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10597         * elfread.c (elf_symtab_read): Give data symbols with
10598         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10599         (elf_rel_plt_read): Update comment.
10600         * linespec.c (convert_linespec_to_sals): Handle
10601         mst_data_gnu_ifunc.
10602         (minsym_found): Handle mst_data_gnu_ifunc.
10603         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10604         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10605         * parse.c (find_minsym_type_and_address): Handle
10606         mst_data_gnu_ifunc.
10607         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10608         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10609         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10610         comment.
10611         <mst_data_gnu_ifunc>: New enumerator.
10612
10613 2018-04-26  Pedro Alves  <palves@redhat.com>
10614
10615         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10616         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10617         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10618         Handle it.
10619         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10620         (lookup_minimal_symbol_by_pc): Adjust.
10621         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10622         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10623         * minsyms.h (lookup_msym_prefer): New enum.
10624         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10625         parameter by a lookup_msym_prefer parameter.
10626
10627 2018-04-26  Pedro Alves  <palves@redhat.com>
10628
10629         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10630         ends in "@plt" instead of looking at the symbol's section.
10631
10632 2018-04-26  Pedro Alves  <palves@redhat.com>
10633
10634         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10635         all references.
10636         (find_pc_partial_function_gnu_ifunc): Rename to ...
10637         (find_pc_partial_function): ... this, and remove references to
10638         'is_gnu_ifunc_p'.
10639         (find_pc_partial_function): Delete old implementation.
10640         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10641
10642 2018-04-26  Pedro Alves  <palves@redhat.com>
10643
10644         * linespec.c (struct bound_minimal_symbol_search_key): New.
10645         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10646         skip first line if we found a GNU ifunc minimal symbol by name.
10647         (compare_msymbols): Change parameters to work with a destructured
10648         lhs minsym.
10649         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10650         functions.
10651
10652 2018-04-26  Pedro Alves  <palves@redhat.com>
10653
10654         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10655         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10656         address/name.
10657         (add_location_to_breakpoint): Store the minsym and the objfile in
10658         the breakpoint location.
10659         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10660         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10661         Record the minsym in the sal.
10662         * symtab.h (symtab_and_line) <msymbol>: New field.
10663
10664 2018-04-26  Pedro Alves  <palves@redhat.com>
10665
10666         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10667         unless we actually resolved the ifunc.
10668
10669 2018-04-26  Pedro Alves  <palves@redhat.com>
10670
10671         * c-exp.y (variable production): Prefer ifunc minsyms over
10672         regular function symbols.
10673         * symtab.c (find_gnu_ifunc): New function.
10674         * minsyms.h (lookup_msym_prefer): New enum.
10675         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10676         parameter by a lookup_msym_prefer parameter.
10677         * symtab.h (find_gnu_ifunc): New declaration.
10678
10679 2018-04-26  Pedro Alves  <palves@redhat.com>
10680
10681         * blockframe.c (find_gnu_ifunc_target_type): New function.
10682         (find_function_type): New.
10683         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10684         return a value with a memory address.
10685         (eval_call): For calls to GNU ifunc functions, try to find the
10686         type of the target function from the type that the resolver
10687         returns.
10688         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10689         symbols.
10690         * infcall.c (find_function_return_type): Delete.
10691         (find_function_addr): Add 'function_type' parameter.  For calls to
10692         GNU ifunc functions, try to find the type of the target function
10693         from the type that the resolver returns, and return it via
10694         FUNCTION_TYPE.
10695         (call_function_by_hand_dummy): Adjust to use the function type
10696         returned by find_function_addr.
10697         (find_function_addr): Add 'function_type' parameter and move
10698         description here.
10699         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10700         declarations.
10701
10702 2018-04-26  Pedro Alves  <palves@redhat.com>
10703
10704         * c-exp.y (variable production): Skip finding an alias for ifunc
10705         symbols.
10706
10707 2018-04-26  Pedro Alves  <palves@redhat.com>
10708
10709         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10710
10711 2018-04-25  Pedro Alves  <palves@redhat.com>
10712
10713         * infcmd.c (kill_command): Print the pid as string, not the whole
10714         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10715         message.
10716         * remote.c (remote_detach_1): Print the pid as string, not the
10717         whole thread's ptid.
10718
10719 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10720             Sergio Durigan Junior  <sergiodj@redhat.com>
10721             Pedro Alves  <palves@redhat.com>
10722
10723         * infcmd.c (kill_command): Print message when inferior has
10724         been killed.
10725         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10726         '1'.
10727         (add_inferior): Improve message printed when
10728         'print_inferior_events' is on.
10729         (exit_inferior): Remove message printed when
10730         'print_inferior_events' is on.
10731         (detach_inferior): Improve message printed when
10732         'print_inferior_events' is on.
10733         (initialize_inferiors): Use 'add_inferior_silent' to set
10734         'current_inferior_'.
10735         * inferior.h (print_inferior_events): Declare here as
10736         'extern'.
10737         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10738         '[Detaching...]' messages when 'print_inferior_events' is on.
10739         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10740         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10741         'Detaching after fork from child...', replace it by '... from
10742         parent...'.
10743         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10744         prefix/suffix when printing 'Detaching...' messages.  Print
10745         them when 'print_inferior_events' is on.
10746         * remote.c (remote_detach_1): Print message when detaching
10747         from inferior and '!is_fork_parent'.
10748
10749 2018-04-24  Tom Tromey  <tom@tromey.com>
10750
10751         * cli-out.h: Reindent.
10752
10753 2018-04-24  Tom Tromey  <tom@tromey.com>
10754
10755         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10756         (cli_ui_out::do_field_string): Use fputs_filtered.
10757         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10758
10759 2018-04-23  Tom Tromey  <tom@tromey.com>
10760
10761         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10762         gdb::unique_xmalloc_ptr.
10763
10764 2018-04-23  Tom Tromey  <tom@tromey.com>
10765
10766         * configure: Rebuild.
10767
10768 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10769
10770         PR gdb/23095
10771         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10772         prepare_for_testing.  Set normal_bp to r_debug_state if target
10773         is bsd.
10774
10775 2018-04-21  Pedro Alves  <palves@redhat.com>
10776             Rajendra SY  <rajendra.sy@gmail.com>
10777
10778         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10779         * remote.c (extended_remote_attach): In all-stop mode, mark the
10780         thread as executing.
10781
10782 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10783
10784         * thread.c (thread_apply_all_command): Fix comment.
10785         (thread_command): Fix comment.
10786
10787 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10788
10789         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10790         parameter.
10791         * features/aarch64-core.c (create_feature_aarch64_core):
10792         Regenerate.
10793         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10794         Likewise.
10795         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10796         Likewise.
10797         * features/i386/32bit-avx512.c
10798         (create_feature_i386_32bit_avx512): Likewise.
10799         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10800         Likewise.
10801         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10802         Likewise.
10803         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10804         Likewise.
10805         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10806         Likewise.
10807         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10808         Likewise.
10809         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10810         Likewise.
10811         * features/i386/64bit-avx512.c
10812         (create_feature_i386_64bit_avx512): Likewise.
10813         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10814         Likewise.
10815         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10816         Likewise.
10817         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10818         Likewise.
10819         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10820         Likewise.
10821         * features/i386/64bit-segments.c
10822         (create_feature_i386_64bit_segments): Likewise.
10823         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10824         Likewise.
10825         * features/i386/x32-core.c
10826         (create_feature_i386_x32_core): Likewise.
10827         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10828         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10829         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10830         * target-descriptions.c: In generated code, don't pass xml
10831         filename.
10832
10833 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10834
10835         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10836         (print_xml_feature::visit_post): Likewise.
10837         (print_xml_feature::visit): Likewise.
10838         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10839         (print_xml_feature): Add new class.
10840         * regformats/regdat.sh: Null xmltarget on feature targets.
10841         * target-descriptions.c (struct target_desc): Add xmltarget.
10842         (maintenance_check_tdesc_xml_convert): Add unittest function.
10843         (tdesc_get_features_xml): Add function to get xml.
10844         (maintenance_check_xml_descriptions): Test xml generation.
10845         * xml-tdesc.c (string_read_description_xml): Add function.
10846         * xml-tdesc.h (string_read_description_xml): Add declaration.
10847
10848 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10849
10850         * features/Makefile: Add feature marker to targets with new style
10851         target descriptions.
10852         * regformats/aarch64.dat: Regenerate.
10853         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10854         * regformats/i386/amd64-avx-linux.dat: Likewise.
10855         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10856         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10857         * regformats/i386/amd64-linux.dat: Likewise.
10858         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10859         * regformats/i386/amd64.dat: Likewise.
10860         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10861         * regformats/i386/i386-avx-linux.dat: Likewise.
10862         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10863         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10864         * regformats/i386/i386-linux.dat: Likewise.
10865         * regformats/i386/i386-mmx-linux.dat: Likewise.
10866         * regformats/i386/i386-mpx-linux.dat: Likewise.
10867         * regformats/i386/i386.dat: Likewise.
10868         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10869         * regformats/i386/x32-avx-linux.dat: Likewise.
10870         * regformats/i386/x32-linux.dat: Likewise.
10871         * regformats/tic6x-c62x-linux.dat: Likewise.
10872         * regformats/tic6x-c64x-linux.dat: Likewise.
10873         * regformats/tic6x-c64xp-linux.dat: Likewise.
10874         * regformats/regdat.sh: Parse feature marker.
10875
10876 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10877
10878         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10879         (tdesc_osabi_name): Likewise.
10880         * target-descriptions.c (tdesc_architecture_name): Add new
10881         function.
10882         (tdesc_osabi_name): Likewise.
10883
10884 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10885
10886         * common/tdesc.c (tdesc_predefined_type): Move to here.
10887         (tdesc_named_type): Likewise.
10888         (tdesc_create_vector): Likewise.
10889         (tdesc_create_struct): Likewise.
10890         (tdesc_set_struct_size): Likewise.
10891         (tdesc_create_union): Likewise.
10892         (tdesc_create_flags): Likewise.
10893         (tdesc_create_enum): Likewise.
10894         (tdesc_add_field): Likewise.
10895         (tdesc_add_typed_bitfield): Likewise.
10896         (tdesc_add_bitfield): Likewise.
10897         (tdesc_add_flag): Likewise.
10898         (tdesc_add_enum_value): Likewise.
10899         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10900         (struct tdesc_type_vector): Likewise.
10901         (struct tdesc_type_field): Likewise.
10902         (struct tdesc_type_with_fields): Likewise.
10903         (tdesc_create_enum): Add declaration.
10904         (tdesc_add_typed_bitfield): Likewise.
10905         (tdesc_add_enum_value): Likewise.
10906         * target-descriptions.c (tdesc_type_field): Move from here.
10907         (tdesc_type_builtin): Likewise.
10908         (tdesc_type_vector): Likewise.
10909         (tdesc_type_with_fields): Likewise.
10910         (tdesc_predefined_types): Likewise.
10911         (tdesc_named_type): Likewise.
10912         (tdesc_create_vector): Likewise.
10913         (tdesc_create_struct): Likewise.
10914         (tdesc_set_struct_size): Likewise.
10915         (tdesc_create_union): Likewise.
10916         (tdesc_create_flags): Likewise.
10917         (tdesc_create_enum): Likewise.
10918         (tdesc_add_field): Likewise.
10919         (tdesc_add_typed_bitfield): Likewise.
10920         (tdesc_add_bitfield): Likewise.
10921         (tdesc_add_flag): Likewise.
10922         (tdesc_add_enum_value): Likewise.
10923         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10924         (tdesc_add_typed_bitfield): Likewise.
10925         (tdesc_add_enum_value): Likewise.
10926
10927 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10928
10929         * common/tdesc.c (tdesc_feature::accept): Move to here.
10930         (tdesc_feature::operator==): Likewise.
10931         (tdesc_create_reg): Likewise.
10932         * common/tdesc.h (tdesc_type_kind): Likewise.
10933         (struct tdesc_type): Likewise.
10934         (struct tdesc_feature): Likewise.
10935         * regformats/regdat.sh: Create a feature.
10936         * target-descriptions.c (tdesc_type_kind): Move from here.
10937         (tdesc_type): Likewise.
10938         (tdesc_type_up): Likewise.
10939         (tdesc_feature): Likewise.
10940         (tdesc_create_reg): Likewise.
10941
10942 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10943
10944         * Makefile.in: Add arch/tdesc.c
10945         * common/tdesc.c: New file.
10946         * common/tdesc.h (tdesc_element_visitor): Move to here.
10947         (tdesc_element): Likewise.
10948         (tdesc_reg): Likewise.
10949         (tdesc_reg_up): Likewise.
10950         * regformats/regdef.h (reg): Add offset to constructors.
10951         * target-descriptions.c (tdesc_element_visitor): Move from here.
10952         (tdesc_element): Likewise.
10953         (tdesc_reg): Likewise.
10954         (tdesc_reg_up): Likewise.
10955
10956 2018-04-17  Tom Tromey  <tom@tromey.com>
10957
10958         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10959         discriminant field.
10960
10961 2018-04-17  Tom Tromey  <tom@tromey.com>
10962
10963         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10964
10965 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10966
10967         * symtab.c (print_symbol_info): Skip printing filename and line
10968         number when `last' is NULL.
10969         (symtab_symbol_info): Use empty string instead of NULL for first
10970         invocation of print_symbol_info.
10971         (rbreak_command): Pass NULL to `last' parameter of
10972         print_symbol_info.
10973
10974 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10975
10976         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10977         instead of nullptr.
10978
10979 2018-04-16  Pedro Alves  <palves@redhat.com>
10980
10981         * MAINTAINERS (sh): Remove.
10982         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10983         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10984         (ALLDEPFILES): Remove sh64-tdep.c.
10985         * NEWS: Mentions that support for SH-5/SH64 is removed.
10986         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10987         (sh*-*-openbsd*): Ditto.
10988         (sh64-*-elf*): Remove.
10989         (sh*): Remove.
10990         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10991         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10992         * sh-tdep.c: No longer include "sh64-tdep.h".
10993         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10994         * sh64-tdep.c, sh64-tdep.h: Remove files.
10995
10996 2018-04-16  Pedro Alves  <palves@redhat.com>
10997
10998         * MAINTAINERS: Remove m88k.
10999         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11000         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11001         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11002         * NEWS: Mention that support for m88k was removed.
11003         * configure.host (m88*-*-*): Remove support.
11004         * configure.nat (m88k-*-*): Remove support.
11005         * configure.tgt (m88*-*-openbsd*): Remove.
11006         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11007
11008 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11009
11010         * configure.tgt (x86_tobjs): New variable.
11011         (amd64_tobjs, i386_tobjs): Use it.
11012
11013 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11014
11015         * symtab.c (print_symbol_info): Precede the symbol definition by
11016         the line number when available.
11017         * NEWS: Advertise this enhancement.
11018
11019 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11020
11021         * NEWS (New options): announce set/show record btrace cpu.
11022         * btrace.c: Include record-btrace.h.
11023         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11024         the vendor is unknown.
11025         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11026         Maybe overwrite the btrace configuration's cpu.
11027         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11028         (btrace_fetch): Add cpu parameter.  Update callers.
11029         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11030         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11031         errata workarounds if the vendor is unknown.
11032         * python/py-record-btrace.c: Include record-btrace.h.
11033         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11034         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11035         * record-btrace.c (record_btrace_cpu_state_kind): New.
11036         (record_btrace_cpu): New.
11037         (set_record_btrace_cpu_cmdlist): New.
11038         (record_btrace_get_cpu): New.
11039         (require_btrace_thread, record_btrace_info)
11040         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11041         (cmd_set_record_btrace_cpu_none): New.
11042         (cmd_set_record_btrace_cpu_auto): New.
11043         (cmd_set_record_btrace_cpu): New.
11044         (cmd_show_record_btrace_cpu): New.
11045         (_initialize_record_btrace): Initialize set/show record btrace cpu
11046         commands.
11047         * record-btrace.h (record_btrace_get_cpu): New.
11048
11049 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11050
11051         * record.c (set_record_command): Fix typo in message.
11052
11053 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11054
11055         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11056
11057 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11058
11059         * infrun.c (process_event_stop_test): Call
11060         gdbarch_in_indirect_branch_thunk.
11061         * gdbarch.sh (in_indirect_branch_thunk): New.
11062         * gdbarch.c: Regenerated.
11063         * gdbarch.h: Regenerated.
11064         * x86-tdep.h: New.
11065         * x86-tdep.c: New.
11066         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11067         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11068         (ALLDEPFILES): Add x86-tdep.c.
11069         * arch-utils.h (default_in_indirect_branch_thunk): New.
11070         * arch-utils.c (default_in_indirect_branch_thunk): New.
11071         * i386-tdep: Include x86-tdep.h.
11072         (i386_in_indirect_branch_thunk): New.
11073         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11074         function.
11075         * amd64-tdep: Include x86-tdep.h.
11076         (amd64_in_indirect_branch_thunk): New.
11077         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11078
11079 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11080
11081         PR gdb/23053
11082         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11083         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11084         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11085         regression.
11086
11087 2018-04-12  Tom Tromey  <tom@tromey.com>
11088
11089         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11090         (rust_evaluate_subexp): Likewise.
11091
11092 2018-04-12  Pedro Alves  <palves@redhat.com>
11093
11094         * procfs.c (procfs_detach): Make forward declaration's prototype
11095         match definition's protototype.
11096         (proc_get_LDT_entry): Remove stale do_cleanups call.
11097
11098 2018-04-12  Pedro Alves  <palves@redhat.com>
11099
11100         * target.h (target_ops::to_has_exited): Delete.
11101         (target_has_exited): Delete.
11102         * target-delegates.c: Regenerate.
11103
11104 2018-04-11  Pedro Alves  <palves@redhat.com>
11105
11106         * target.c (fileio_fh_t::t): Add comment.
11107         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11108         (target_fileio_close): Handle a NULL target.
11109         (invalidate_fileio_fh): New.
11110         (target_close): Call it.
11111         * remote.c (remote_hostio_send_command): No longer check whether
11112         remote_desc is open.
11113
11114 2018-04-11  Pedro Alves  <palves@redhat.com>
11115
11116         * target.c (fileio_fh_t): Make it a named struct instead of a
11117         typedef.
11118         (fileio_fh_t::is_closed): New method.
11119         (DEF_VEC_O (fileio_fh_t)): Remove.
11120         (fileio_fhandles): Now a std::vector.
11121         (is_closed_fileio_fh): Delete.
11122         (acquire_fileio_fd): Adjust.  Rename parameters.
11123         (release_fileio_fd): Adjust.
11124         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11125         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11126         (target_fileio_close): Adjust.
11127
11128 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11129
11130         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11131         index.
11132
11133 2018-04-10  Pedro Alves  <palves@redhat.com>
11134
11135         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11136         (scoped_finish_thread_state): New class.
11137         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11138         cleanup.
11139         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11140         (fetch_inferior_event, normal_stop): Likewise.
11141         * thread.c (finish_thread_state_cleanup): Delete.
11142
11143 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11144             Pedro Alves  <palves@redhat.com>
11145
11146         * value.c: Include "selftest.h" and "common/array-view.h".
11147         (struct range) <operator ==>: New.
11148         (test_ranges_contain): New.
11149         (check_ranges_vector): New.
11150         (test_insert_into_bit_range_vector): New.
11151         (_initialize_values): Register selftests.
11152         * common/array-view.h (operator==, operator!=): New.
11153
11154 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11155
11156         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11157         an iterator.
11158         * inline-frame.c: Include <algorithm>.
11159         (struct inline_state): Add constructor.
11160         (inline_state_s): Remove.
11161         (DEF_VEC_O(inline_state_s)): Remove.
11162         (inline_states): Change type to std::vector.
11163         (find_inline_frame_state): Adjust to std::vector.
11164         (allocate_inline_frame_state): Remove.
11165         (clear_inline_frame_state): Adjust to std::vector.
11166         (skip_inline_frames): Adjust to std::vector.
11167
11168 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11169
11170         * tracepoint.h (struct trace_state_variable): Add constructor.
11171         <name>: Change type to std::string.
11172         * tracepoint.c (tsv_s): Remove.
11173         (DEF_VEC_O(tsv_s)): Remove.
11174         (tvariables): Change to std::vector.
11175         (create_trace_state_variable): Adjust to std::vector.
11176         (find_trace_state_variable): Likewise.
11177         (find_trace_state_variable_by_number): Likewise.
11178         (delete_trace_state_variable): Likewise.
11179         (trace_variable_command): Adjust to std::string.
11180         (delete_trace_variable_command): Likewise.
11181         (tvariables_info_1): Adjust to std::vector.
11182         (save_trace_state_variables): Likewise.
11183         (start_tracing): Likewise.
11184         (merge_uploaded_trace_state_variables): Adjust to std::vector
11185         and std::string.
11186         * target.h (struct target_ops)
11187         <to_download_trace_state_variable>: Pass reference to
11188         trace_state_variable.
11189         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11190         * target-delegates.c: Re-generate.
11191         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11192         (mi_tsv_deleted): Likewise.
11193         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11194         * remote.c (remote_download_trace_state_variable): Change
11195         pointer to reference and adjust.
11196         * make-target-delegates (parse_argtypes): Handle references.
11197         (write_function_header): Likewise.
11198         (munge_type): Likewise.
11199
11200 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11201
11202         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11203         string_view-selftests.c.
11204         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11205         testsuite.
11206         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11207         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11208         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11209         * unittests/basic_string_view/element_access/char/1.cc:
11210         Likewise.
11211         * unittests/basic_string_view/element_access/char/empty.cc:
11212         Likewise.
11213         * unittests/basic_string_view/element_access/char/front_back.cc:
11214         Likewise.
11215         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11216         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11217         Likewise.
11218         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11219         Likewise.
11220         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11221         Likewise.
11222         * unittests/basic_string_view/operations/compare/char/1.cc:
11223         Likewise.
11224         * unittests/basic_string_view/operations/compare/char/13650.cc:
11225         Likewise.
11226         * unittests/basic_string_view/operations/copy/char/1.cc:
11227         Likewise.
11228         * unittests/basic_string_view/operations/data/char/1.cc:
11229         Likewise.
11230         * unittests/basic_string_view/operations/find/char/1.cc:
11231         Likewise.
11232         * unittests/basic_string_view/operations/find/char/2.cc:
11233         Likewise.
11234         * unittests/basic_string_view/operations/find/char/3.cc:
11235         Likewise.
11236         * unittests/basic_string_view/operations/find/char/4.cc:
11237         Likewise.
11238         * unittests/basic_string_view/operations/rfind/char/1.cc:
11239         Likewise.
11240         * unittests/basic_string_view/operations/rfind/char/2.cc:
11241         Likewise.
11242         * unittests/basic_string_view/operations/rfind/char/3.cc:
11243         Likewise.
11244         * unittests/basic_string_view/operations/substr/char/1.cc:
11245         Likewise.
11246         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11247         * unittests/string_view-selftests.c: New file.
11248
11249 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11250
11251         * unittests/basic_string_view/capacity/1.cc: New file.
11252         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11253         * unittests/basic_string_view/cons/char/1.cc: New file.
11254         * unittests/basic_string_view/cons/char/2.cc: New file.
11255         * unittests/basic_string_view/cons/char/3.cc: New file.
11256         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11257         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11258         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11259         * unittests/basic_string_view/element_access/char/1.cc: New file.
11260         * unittests/basic_string_view/element_access/char/2.cc: New file.
11261         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11262         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11263         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11264         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11265         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11266         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11267         * unittests/basic_string_view/include.cc: New file.
11268         * unittests/basic_string_view/inserters/char/1.cc: New file.
11269         * unittests/basic_string_view/inserters/char/2.cc: New file.
11270         * unittests/basic_string_view/inserters/char/3.cc: New file.
11271         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11272         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11273         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11274         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11275         * unittests/basic_string_view/literals/types.cc: New file.
11276         * unittests/basic_string_view/literals/values.cc: New file.
11277         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11278         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11279         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11280         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11281         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11282         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11283         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11284         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11285         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11286         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11287         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11288         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11289         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11290         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11291         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11292         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11293         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11294         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11295         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11296         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11297         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11298         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11299         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11300         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11301         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11302         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11303         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11304         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11305         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11306         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11307         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11308         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11309         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11310         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11311         * unittests/basic_string_view/operators/char/2.cc: New file.
11312         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11313         * unittests/basic_string_view/range_access/char/1.cc: New file.
11314         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11315         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11316         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11317         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11318         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11319         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11320         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11321         * unittests/basic_string_view/typedefs.cc: New file.
11322         * unittests/basic_string_view/types/1.cc: New file.
11323
11324 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11325
11326         * common/gdb_string_view.h: Remove libstdc++ implementation
11327         details, adjust to gdb reality.
11328         * common/gdb_string_view.tcc: Likewise.
11329         * cli/cli-script.c (struct string_view): Remove.
11330         (user_args) <m_args>: Change element type to gdb::string_view.
11331         (user_args::insert_args): Adjust.
11332
11333 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11334
11335         * common/gdb_string_view.h: New file.
11336         * common/gdb_string_view.tcc: New file.
11337
11338 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11339
11340         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11341         * configure: Re-generate.
11342
11343 2018-04-09  Pedro Alves  <palves@redhat.com>
11344
11345         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11346         (set_target_gdbarch): Call
11347         gdb::observers::architecture_changed.notify instead of
11348         observer_notify_architecture_changed.
11349
11350 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11351
11352         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11353         (do_restore_current_traceframe_cleanup): Remove.
11354         (restore_current_traceframe_cleanup_dtor): Remove.
11355         (make_cleanup_restore_current_traceframe): Remove.
11356         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11357         New.
11358         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11359         * infrun.c (fetch_inferior_event): Use
11360         scoped_restore_current_traceframe.
11361
11362 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11363
11364         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11365         Remove.
11366         <n_allocated_type_units>: Remove.
11367         <all_type_units>: Change to std::vector.
11368         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11369         to std::vector change.
11370         (dwarf2_per_objfile::get_cutu): Likewise.
11371         (dwarf2_per_objfile::get_tu): Likewise.
11372         (create_signatured_type_table_from_index): Likewise.
11373         (create_signatured_type_table_from_debug_names): Likewise.
11374         (dw2_symtab_iter_next): Likewise.
11375         (dw2_print_stats): Likewise.
11376         (dw2_expand_all_symtabs): Likewise.
11377         (dw2_expand_marked_cus): Likewise.
11378         (dw2_debug_names_iterator::next): Likewise.
11379         (dwarf2_initialize_objfile): Likewise.
11380         (add_signatured_type_cu_to_table): Likewise.
11381         (create_all_type_units): Likewise.
11382         (add_type_unit): Likewise.
11383         (struct tu_abbrev_offset): Add constructor.
11384         (build_type_psymtabs_1): Adjust to std::vector change.
11385         (print_tu_stats): Likewise.
11386         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11387         (write_debug_names): Likewise.
11388
11389 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11390
11391         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11392         Make an std::vector.
11393         <n_comp_units>: Remove.
11394         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11395         to std::vector change.
11396         (dwarf2_per_objfile::get_cutu): Likewise.
11397         (dwarf2_per_objfile::get_cu): Likewise.
11398         (create_cus_from_index): Likewise.
11399         (create_addrmap_from_index): Likewise.
11400         (create_addrmap_from_aranges): Likewise.
11401         (dwarf2_read_index): Likewise.
11402         (dw2_find_last_source_symtab): Likewise.
11403         (dw2_map_symtabs_matching_filename): Likewise.
11404         (dw2_symtab_iter_next): Likewise.
11405         (dw2_print_stats): Likewise.
11406         (dw2_expand_all_symtabs): Likewise.
11407         (dw2_expand_symtabs_with_fullname): Likewise.
11408         (dw2_expand_marked_cus): Likewise.
11409         (dw2_map_symbol_filenames): Likewise.
11410         (create_cus_from_debug_names): Likewise.
11411         (dwarf2_read_debug_names): Likewise.
11412         (dw2_debug_names_iterator::next): Likewise.
11413         (dwarf2_initialize_objfile): Likewise.
11414         (set_partial_user): Likewise.
11415         (dwarf2_build_psymtabs_hard): Likewise.
11416         (read_comp_units_from_section): Remove arguments, adjust to
11417         std::vector change.
11418         (create_all_comp_units): Adjust to std::vector and
11419         read_comp_units_from_section changes.
11420         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11421         change.
11422         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11423         (psyms_seen_size): Likewise.
11424         (write_gdbindex): Likewise.
11425         (write_debug_names): Likewise.
11426
11427 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11428
11429         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11430         with dwarf2_per_objfile.
11431         (create_cus_from_index): Likewise.
11432         (create_signatured_type_table_from_index): Likewise.
11433         (dwarf2_read_index): Likewise.
11434         (dwarf2_initialize_objfile): Likewise.
11435         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11436         per_cu rather than get_dwarf2_per_objfile.
11437
11438 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11439
11440         * dwarf2read.h (struct signatured_type): Forward declare.
11441         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11442         New methods.
11443         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11444         (dw2_get_cutu): ...this.
11445         (dwarf2_per_objfile::get_cu): Rename from...
11446         (dw2_get_cu): ...this.
11447         (dwarf2_per_objfile::get_tu): New.
11448         (create_addrmap_from_index): Adjust.
11449         (create_addrmap_from_aranges): Adjust.
11450         (dw2_find_last_source_symtab): Adjust.
11451         (dw2_map_symtabs_matching_filename): Adjust.
11452         (dw2_symtab_iter_next): Adjust.
11453         (dw2_print_stats): Adjust.
11454         (dw2_expand_all_symtabs): Adjust.
11455         (dw2_expand_symtabs_with_fullname): Adjust.
11456         (dw2_expand_marked_cus): Adjust.
11457         (dw_expand_symtabs_matching_file_matcher): Adjust.
11458         (dw2_map_symbol_filenames): Adjust.
11459         (dw2_debug_names_iterator::next): Adjust.
11460         (dwarf2_initialize_objfile): Adjust.
11461         (set_partial_user): Adjust.
11462         (dwarf2_build_psymtabs_hard): Adjust.
11463
11464 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11465
11466         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11467         Remove unused variables.
11468         (dw2_map_symtabs_matching_filename): Likewise.
11469         (dwarf2_record_block_ranges): Likewise.
11470         (dwarf2_read_addr_index): Likewise.
11471         (follow_die_offset): Likewise.
11472
11473 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11474
11475         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11476         to symbol_file_add_main.
11477
11478 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11479
11480         PR mi/22299
11481         * mi/mi-console.c (do_fputc_async_safe): New.
11482         (mi_console_file::write_async_safe): New.
11483         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11484         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11485         New.
11486         * ui-file.c (ui_file::putstrn): Adjust call to
11487         fputstrn_unfiltered.
11488         * utils.c (printchar): Replace do_fputs and do_fprintf
11489         parameters by do_fputc.
11490         (fputstr_filtered): Adjust call to printchar.
11491         (fputstr_unfiltered): Likewise.
11492         (fputstrn_filtered): Likewise.
11493         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11494         printchar.
11495         * utils.h (do_fputc_ftype): New typedef.
11496         (fputstrn_unfiltered): Add do_fputc parameter.
11497
11498 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11499
11500         * regformats/i386/i386-avx.dat: Remove.
11501
11502 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11503
11504         PR gdb/22979
11505         * amd64-tdep.c (amd64_none_init_abi): New function.
11506         (amd64_x32_none_init_abi): New function.
11507         (_initialize_amd64_tdep): Register handlers for x86-64 and
11508         x64_32 with GDB_OSABI_NONE.
11509         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11510         GDB_OSABI_NONE osabi.
11511
11512 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11513
11514         PR gdb/22980
11515         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11516         GDB_OSABI_NONE.
11517         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11518         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11519
11520 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11521
11522         * common/byte-vector.h (char_vector): New type.
11523         * target.h (target_read_alloc): Return
11524         gdb::optional<byte_vector>.
11525         (target_read_stralloc): Return gdb::optional<char_vector>.
11526         (target_get_osdata): Return gdb::optional<char_vector>.
11527         * target.c (target_read_alloc_1): Templatize.  Replacement
11528         manual memory management with vector.
11529         (target_read_alloc): Change return type, adjust.
11530         (target_read_stralloc): Change return type, adjust.
11531         (target_get_osdata): Change return type, adjust.
11532         * auxv.c (struct auxv_info) <length>: Remove.
11533         <data>: Change type to gdb::optional<byte_vector>.
11534         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11535         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11536         (target_auxv_search): Adjust.
11537         (fprint_target_auxv): Adjust.
11538         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11539         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11540         (linux_make_corefile_notes): Adjust.
11541         * osdata.c (get_osdata): Adjust.
11542         * remote.c (remote_get_threads_with_qxfer): Adjust.
11543         (remote_memory_map): Adjust.
11544         (remote_traceframe_info): Adjust.
11545         (btrace_read_config): Adjust.
11546         (remote_read_btrace): Adjust.
11547         (remote_pid_to_exec_file): Adjust.
11548         * solib-aix.c (solib_aix_get_library_list): Adjust.
11549         * solib-dsbt.c (decode_loadmap): Don't free buf.
11550         (dsbt_get_initial_loadmaps): Adjust.
11551         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11552         * solib-target.c (solib_target_current_sos): Adjust.
11553         * tracepoint.c (sdata_make_value): Adjust.
11554         * xml-support.c (xinclude_start_include): Adjust.
11555         (xml_fetch_content_from_file): Adjust.
11556         * xml-support.h (xml_fetch_another): Change return type.
11557         (xml_fetch_content_from_file): Change return type.
11558         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11559         * xml-tdesc.c (file_read_description_xml): Adjust.
11560         (fetch_available_features_from_target): Change return type.
11561         (target_fetch_description_xml): Adjust.
11562         (target_read_description_xml): Adjust.
11563
11564 2018-04-06  Tom Tromey  <tom@tromey.com>
11565
11566         * value.c (~value): Update.
11567         (struct value) <contents>: Now unique_xmalloc_ptr.
11568         (value_contents_bits_eq, allocate_value_contents)
11569         (value_contents_raw, value_contents_all_raw)
11570         (value_contents_for_printing, value_contents_for_printing_const)
11571         (set_value_enclosing_type): Update.
11572
11573 2018-04-06  Tom Tromey  <tom@tromey.com>
11574
11575         * value.c (range_s): Remove typedef, VEC.
11576         (struct range): Add operator<.
11577         (range_lessthan): Remove.
11578         (ranges_contain): Change type.
11579         (~value): Update.
11580         (struct value) <unavailable, optimized_out>: Now std::vector.
11581         (value_entirely_available)
11582         (value_entirely_covered_by_range_vector)
11583         (value_entirely_unavailable, value_entirely_optimized_out):
11584         Update.
11585         (insert_into_bit_range_vector): Change argument type.
11586         (find_first_range_overlap): Likewise.
11587         (struct ranges_and_idx, value_contents_bits_eq)
11588         (require_not_optimized_out, require_available): Update.
11589         (ranges_copy_adjusted): Change argument types.
11590         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11591
11592 2018-04-06  Tom Tromey  <tom@tromey.com>
11593
11594         * value.c (~value): Update.
11595         (struct value) <parent>: Now a value_ref_ptr.
11596         (value_parent, set_value_parent, value_address, value_copy):
11597         Update.
11598
11599 2018-04-06  Tom Tromey  <tom@tromey.com>
11600
11601         * value.c (struct value): Add constructor, destructor, and member
11602         initializers.
11603         (allocate_value_lazy, value_decref): Update.
11604
11605 2018-04-06  Tom Tromey  <tom@tromey.com>
11606
11607         * value.c (struct value) <released, next>: Remove.
11608         (all_values): Now a std::vector.
11609         (allocate_value_lazy): Update.
11610         (value_next): Remove.
11611         (value_mark, value_free_to_mark, release_value)
11612         (value_release_to_mark): Update.
11613
11614 2018-04-06  Tom Tromey  <tom@tromey.com>
11615
11616         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11617         (free_value_chain): Remove.
11618         * value.c (free_value_chain): Remove.
11619         (value_release_to_mark): Return a std::vector.
11620         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11621         std::vector.
11622         (check_condition): Update.
11623         * eval.c (fetch_subexp_value): Change "val_chain" to a
11624         std::vector.
11625         * breakpoint.c (update_watchpoint): Update.
11626         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11627
11628 2018-04-06  Tom Tromey  <tom@tromey.com>
11629
11630         * value.h (free_all_values): Remove.
11631         * value.c (free_all_values): Remove.
11632
11633 2018-04-06  Tom Tromey  <tom@tromey.com>
11634
11635         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11636         (value_history_chain, value_history_count): Remove.
11637         (value_history): New global.
11638         (record_latest_value, access_value_history, show_values)
11639         (preserve_values): Update.
11640
11641 2018-04-06  Tom Tromey  <tom@tromey.com>
11642
11643         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11644         * varobj.c (varobj_set_display_format, varobj_set_value)
11645         (install_default_visualizer, construct_visualizer)
11646         (install_new_value, ~varobj, varobj_get_value_type)
11647         (my_value_of_variable, varobj_editable_p): Update.
11648         * c-varobj.c (c_describe_child, c_value_of_variable)
11649         (cplus_number_of_children, cplus_describe_child): Update.
11650         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11651         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11652         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11653
11654 2018-04-06  Tom Tromey  <tom@tromey.com>
11655
11656         * printcmd.c (last_examine_address): Change type to
11657         value_ref_ptr.
11658         (do_examine, x_command): Update.
11659
11660 2018-04-06  Tom Tromey  <tom@tromey.com>
11661
11662         * value.c (release_value): Update.
11663         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11664         (struct bpstats) <val>: Now a value_ref_ptr.
11665         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11666         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11667         (~watchpoint, print_it_watchpoint, watch_command_1)
11668         (invalidate_bp_value_on_memory_change): Update.
11669
11670 2018-04-06  Tom Tromey  <tom@tromey.com>
11671
11672         * varobj.c (varobj_clear_saved_item)
11673         (update_dynamic_varobj_children, install_new_value, ~varobj):
11674         Update.
11675         * value.h (value_incref): Move declaration earlier.
11676         (value_decref): Rename from value_free.
11677         (struct value_ref_policy): New.
11678         (value_ref_ptr): New typedef.
11679         (struct value_deleter): Remove.
11680         (gdb_value_up): Remove typedef.
11681         (release_value): Change return type.
11682         (release_value_or_incref): Remove.
11683         * value.c (set_value_parent): Update.
11684         (value_incref): Change return type.
11685         (value_decref): Rename from value_free.
11686         (value_free_to_mark, free_all_values, free_value_chain): Update.
11687         (release_value): Return value_ref_ptr.
11688         (release_value_or_incref): Remove.
11689         (record_latest_value, set_internalvar, clear_internalvar):
11690         Update.
11691         * stack.c (info_frame_command): Don't call value_free.
11692         * python/py-value.c (valpy_dealloc, valpy_new)
11693         (value_to_value_object): Update.
11694         * printcmd.c (do_examine): Update.
11695         * opencl-lang.c (lval_func_free_closure): Update.
11696         * mi/mi-main.c (register_changed_p): Don't call value_free.
11697         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11698         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11699         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11700         value_free.
11701         * guile/scm-value.c (vlscm_free_value_smob)
11702         (vlscm_scm_from_value): Update.
11703         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11704         (frame_unwind_register_unsigned, get_frame_register_bytes)
11705         (put_frame_register_bytes): Don't call value_free.
11706         * findvar.c (address_from_register): Don't call value_free.
11707         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11708         * dwarf2loc.c (entry_data_value_free_closure)
11709         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11710         (dwarf2_evaluate_loc_desc_full): Update.
11711         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11712         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11713         (~watchpoint, watch_command_1)
11714         (invalidate_bp_value_on_memory_change): Update.
11715         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11716
11717 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11718
11719         PR gdb/23022
11720         * warning.m4: Add -Wno-error=deprecated-register.
11721         * configure: Re-generate.
11722
11723 2018-04-05  Tom Tromey  <tom@tromey.com>
11724
11725         * linespec.h: Remove include of "vec.h".
11726
11727 2018-04-05  Tom Tromey  <tom@tromey.com>
11728
11729         * linespec.c (typep): Remove typedef.
11730         (find_methods, find_superclass_methods): Take a std::vector.
11731         (find_method): Use std::vector.
11732
11733 2018-04-05  Tom Tromey  <tom@tromey.com>
11734
11735         * utils.c (compare_strings): Remove.
11736         * utils.h (compare_strings): Remove.
11737         * objc-lang.h (find_imps): Update.
11738         * objc-lang.c (find_methods): Take a std::vector.
11739         (uniquify_strings, find_imps): Likewise.
11740         * linespec.c (find_methods): Take a std::vector.
11741         (decode_objc): Use std::vector.
11742         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11743         a std::vector.
11744         (find_method, find_function_symbols): Use std::vector.
11745
11746 2018-04-05  Tom Tromey  <tom@tromey.com>
11747
11748         * completer.c (completion_tracker::completion_tracker): Remove
11749         cast.
11750         (completion_tracker::discard_completions): Likewise.
11751         * breakpoint.c (ambiguous_names_p): Remove cast.
11752         * ada-lang.c (_initialize_ada_language): Remove cast.
11753         * utils.h (streq): Update.
11754         (streq_hash): Add new declaration.
11755         * utils.c (streq): Return bool.
11756         (streq_hash): New function.
11757
11758 2018-04-05  Tom Tromey  <tom@tromey.com>
11759
11760         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11761         Remove a string copy.
11762
11763 2018-04-05  Tom Tromey  <tom@tromey.com>
11764
11765         * linespec.c (filter_results): Use std::vector.
11766         (decode_line_2, decode_line_full): Update.
11767
11768 2018-04-05  Tom Tromey  <tom@tromey.com>
11769
11770         * linespec.c (canonical_to_fullform): Return std::string.
11771         (filter_results): Update.
11772         (struct decode_line_2_item): Add constructor.
11773         <fullform, displayform>: Now std::string.
11774         (decode_line_2_compare_items): Now a std::sort comparator.
11775         (decode_line_2): Update.
11776
11777 2018-04-05  Tom Tromey  <tom@tromey.com>
11778
11779         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11780         (unexpected_linespec_error): Update.
11781         (linespec_parse_basic, parse_linespec): Update.
11782
11783 2018-04-05  Tom Tromey  <tom@tromey.com>
11784
11785         * linespec.c (linespec_parse_basic): Reindent.
11786
11787 2018-04-05  Tom Tromey  <tom@tromey.com>
11788
11789         * minsyms.h (iterate_over_minimal_symbols): Update.
11790         * minsyms.c (iterate_over_minimal_symbols): Take a
11791         gdb::function_view.
11792         * linespec.c (struct collect_minsyms): Remove.
11793         (compare_msyms): Now a std::sort comparator.
11794         (add_minsym): Add parameters.
11795         (search_minsyms_for_name): Update.  Use std::vector.
11796
11797 2018-04-03  Tom Tromey  <tom@tromey.com>
11798
11799         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11800         gdb::byte_vector.
11801
11802 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11803
11804         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11805
11806 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11807
11808         PR gdb/16959
11809         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11810         printing static type.
11811
11812 2018-04-01  Tom Tromey  <tom@tromey.com>
11813
11814         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11815         (rs6000_xfer_shared_libraries): Update.
11816
11817 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11818
11819         * common/gdb_vecs.h (char_ptr): Remove.
11820         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11821
11822 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11823
11824         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11825         with std::vector.
11826         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11827
11828 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11829
11830         * tracepoint.h (struct uploaded_tp): Initialize fields.
11831         <actions, step_actions, cmd_strings>: Change type to
11832         std::vector<char *>.
11833         * tracepoint.c (get_uploaded_tp): Allocate with new.
11834         (free_uploaded_tps): Free with delete.
11835         (parse_tracepoint_definition): Adjust to std::vector change.
11836         * breakpoint.c (read_uploaded_action): Likewise.
11837         (create_tracepoint_from_upload): Likewise.
11838         * ctf.c (ctf_write_uploaded_tp): Likewise.
11839         (SET_ARRAY_FIELD): Likewise.
11840         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11841
11842 2018-03-30  Tom Tromey  <tom@tromey.com>
11843
11844         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11845         std::unique_ptr.
11846         (svr4_keep_data_in_core): Update.
11847         (svr4_read_so_list): Update.
11848
11849 2018-03-30  Tom Tromey  <tom@tromey.com>
11850
11851         * windows-nat.c (handle_output_debug_string, handle_exception):
11852         Update.
11853         * target.h (target_read_string): Update.
11854         * target.c (target_read_string): Change "string" to
11855         unique_xmalloc_ptr.
11856         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11857         Update.
11858         * solib-frv.c (frv_current_sos): Update.
11859         * solib-dsbt.c (dsbt_current_sos): Update.
11860         * solib-darwin.c (darwin_current_sos): Update.
11861         * linux-thread-db.c (inferior_has_bug): Update.
11862         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11863         Update.  Remove alloca.
11864         * ada-lang.c (ada_main_name): Update.
11865
11866 2018-03-30  Tom Tromey  <tom@tromey.com>
11867
11868         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11869         (struct dwo_file_deleter): New.
11870         (dwo_file_up): New typedef.
11871         (open_and_init_dwo_file): Use dwo_file_up.
11872         (free_dwo_file_cleanup): Remove.
11873
11874 2018-03-30  Tom Tromey  <tom@tromey.com>
11875
11876         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11877         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11878
11879 2018-03-30  Tom Tromey  <tom@tromey.com>
11880
11881         * dwarf2read.c (class free_cached_comp_units): New class.
11882         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11883         (free_cached_comp_units): Remove function.
11884
11885 2018-03-30  Tom Tromey  <tom@tromey.com>
11886
11887         * utils.h (make_cleanup_unpush_target): Remove.
11888         * inf-ptrace.c (struct target_unpusher): New.
11889         (target_unpush_up) New typedef.
11890         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11891         target_unpush_up.
11892         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11893
11894 2018-03-27  Tom Tromey  <tom@tromey.com>
11895
11896         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11897
11898 2018-03-27  Pedro Alves  <palves@redhat.com>
11899             Tom Tromey  <tom@tromey.com>
11900
11901         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11902         destructor.  Now a class.
11903         (gdb_readline_wrapper_cleanup): Remove function.
11904         (gdb_readline_wrapper): Remove cleanups.
11905
11906 2018-03-27  Tom Tromey  <tom@tromey.com>
11907
11908         * typeprint.h (struct type_print_options) <local_typedefs,
11909         global_typedefs>: Remove "struct" keyword.
11910         (class typedef_hash_table): New class.
11911         (recursively_update_typedef_hash, add_template_parameters)
11912         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11913         (find_typedef_in_hash): Don't declare.
11914         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11915         (typedef_hash_table::recursively_update): Rename from
11916         recursively_update_typedef_hash.  Now a member.
11917         (typedef_hash_table::add_template_parameters): Rename from
11918         add_template_parameters.  Now a member.
11919         (typedef_hash_table::typedef_hash_table): Now a constructor;
11920         rename from create_typedef_hash.
11921         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11922         rename from free_typedef_hash.
11923         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11924         (do_free_global_table): Remove.
11925         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11926         from copy_type_recursive.
11927         (create_global_typedef_table): Remove.
11928         (typedef_hash_table::find_global_typedef): Now a member of
11929         typedef_hash_table.
11930         (typedef_hash_table::find_typedef): Rename from
11931         find_typedef_in_hash; now a member.
11932         (whatis_exp): Update.
11933         * extension.h (struct ext_lang_type_printers): Add constructor and
11934         destructor.
11935         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11936         declare.
11937         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11938         Now a constructor; rename from start_ext_lang_type_printers.
11939         (ext_lang_type_printers): Now a destructor; rename from
11940         free_ext_lang_type_printers.
11941         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11942         Update.
11943         (c_type_print_base_struct_union): Update.  Remove cleanups.
11944
11945 2018-03-27  Tom Tromey  <tom@tromey.com>
11946
11947         * dwarf-index-write.c: Include <cmath>.
11948
11949 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11950
11951         * NEWS: Add entry describing new "set|show varsize-limit" command.
11952         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11953         command.
11954         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11955         "set variable".
11956
11957 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11958
11959         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11960         dwarf-index-write.c
11961         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11962         * dwarf-index-common.c: New file.
11963         * dwarf-index-common.h: New file.
11964         * dwarf-index-write.c: New file.
11965         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11966         (struct dwarf2_section_info): Move from here.
11967         (dwarf2_section_info_def): Likewise.
11968         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11969         (offset_type): Likewise.
11970         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11971         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11972         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11973         (byte_swap): Likewise.
11974         (MAYBE_SWAP): Likewise.
11975         (dwarf2_per_cu_ptr): Likewise.
11976         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11977         (struct tu_stats): Likewise.
11978         (struct dwarf2_per_objfile): Likewise.
11979         (struct dwarf2_per_cu_data): Likewise.
11980         (struct signatured_type): Likewise.
11981         (sig_type_ptr): Likewise.
11982         (DEF_VEC_P (sig_type_ptr)): Likewise.
11983         (INDEX4_SUFFIX): Likewise.
11984         (INDEX5_SUFFIX): Likewise.
11985         (DEBUG_STR_SUFFIX): Likewise.
11986         (dwarf2_read_section): Make non-static.
11987         (mapped_index_string_hash): Move from here.
11988         (dwarf5_djb_hash): Likewise.
11989         (file_write): Likewise.
11990         (class data_buf): Likewise.
11991         (struct symtab_index_entry): Likewise.
11992         (struct mapped_symtab): Likewise.
11993         (find_slot): Likewise.
11994         (hash_expand): Likewise.
11995         (add_index_entry): Likewise.
11996         (uniquify_cu_indices): Likewise.
11997         (class c_str_view): Likewise.
11998         (class c_str_view_hasher): Likewise.
11999         (class vector_hasher): Likewise.
12000         (write_hash_table): Likewise.
12001         (psym_index_map): Likewise.
12002         (struct addrmap_index_data): Likewise.
12003         (add_address_entry): Likewise.
12004         (add_address_entry_worker): Likewise.
12005         (write_address_map): Likewise.
12006         (symbol_kind): Likewise.
12007         (write_psymbols): Likewise.
12008         (struct signatured_type_index_data): Likewise.
12009         (write_one_signatured_type): Likewise.
12010         (recursively_count_psymbols): Likewise.
12011         (recursively_write_psymbols): Likewise.
12012         (class debug_names): Likewise.
12013         (check_dwarf64_offsets): Likewise.
12014         (psyms_seen_size): Likewise.
12015         (write_gdbindex): Likewise.
12016         (write_debug_names): Likewise.
12017         (assert_file_size): Likewise.
12018         (write_psymtabs_to_index): Likewise.
12019         (save_gdb_index_command): Likewise.
12020         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12021         command.
12022         * dwarf2read.h: New file.
12023
12024 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12025
12026         PR gdb/22670
12027         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12028         symbol name if the CU's language stores symbol names in linkage
12029         format.
12030         * language.h (struct language_defn)
12031         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12032         all instances of this struct.
12033
12034 2018-03-26  Tom Tromey  <tom@tromey.com>
12035
12036         * stack.c (backtrace_command_1): Remove verbose code.
12037
12038 2018-03-26  Tom Tromey  <tom@tromey.com>
12039
12040         * python/py-framefilter.c (py_print_type): Don't catch
12041         exceptions.  Return void.
12042         (py_print_value): Likewise.
12043         (py_print_single_arg): Likewise.
12044         (enumerate_args): Don't catch exceptions.
12045         (py_print_args): Likewise.
12046         (py_print_frame): Likewise.
12047         (gdbpy_apply_frame_filter): Catch exceptions here.
12048
12049 2018-03-26  Tom Tromey  <tom@tromey.com>
12050
12051         * stack.c (_initialize_stack): Remove trailing newlines from help
12052         text.  Add "Usage" line to "backtrace" help.
12053
12054 2018-03-26  Tom Tromey  <tom@tromey.com>
12055
12056         PR python/16486:
12057         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12058
12059 2018-03-26  Tom Tromey  <tom@tromey.com>
12060
12061         * python/py-framefilter.c (py_print_single_arg): Return
12062         EXT_LANG_BT_ERROR from catch.
12063
12064 2018-03-26  Tom Tromey  <tom@tromey.com>
12065
12066         PR backtrace/15584:
12067         * stack.c (backtrace_command_1): Move some code into no-filters
12068         "if".
12069
12070 2018-03-26  Tom Tromey  <tom@tromey.com>
12071
12072         * python/py-framefilter.c (throw_quit_or_print_exception): New
12073         function.
12074         (gdbpy_apply_frame_filter): Use it.
12075
12076 2018-03-26  Tom Tromey  <tom@tromey.com>
12077
12078         PR cli/17716:
12079         * python/py-framefilter.c (py_print_type, py_print_value)
12080         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12081         RETURN_MASK_ERROR.
12082
12083 2018-03-26  Tom Tromey  <tom@tromey.com>
12084
12085         * python/py-framefilter.c (enumerate_args): Use
12086         gdb::unique_xmalloc_ptr.
12087
12088 2018-03-26  Tom Tromey  <tom@tromey.com>
12089
12090         * python/py-framefilter.c (py_print_frame): Return
12091         EXT_LANG_BT_OK.
12092         (gdbpy_apply_frame_filter): Update comment.
12093         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12094         Remove.
12095         <EXT_LANG_BT_NO_FILTERS>: Change value.
12096
12097 2018-03-26  Tom Tromey  <tom@tromey.com>
12098
12099         PR backtrace/15582:
12100         * stack.c (backtrace_command): Parse "hide" argument.
12101         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12102         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12103         constant.
12104
12105 2018-03-26  Tom Tromey  <tom@tromey.com>
12106
12107         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12108         add "flags".
12109         (backtrace_command): Remove "fulltrace", add "flags".
12110
12111 2018-03-26  Tom Tromey  <tom@tromey.com>
12112
12113         * stack.c (backtrace_command): Rewrite command line parsing.
12114
12115 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12116
12117         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12118
12119 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12120
12121         * filename-seen-cache.h: Add include guard.
12122
12123 2018-03-26  Keith Seitz  <keiths@redhat.com>
12124
12125         * symfile.c (place_section): Remove "struct" from section_addr_info
12126         in comment.
12127         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12128         "struct" keyword from section_addr_info.
12129
12130 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12131
12132         * regformats/regdef.h (reg): Add constructors.
12133
12134 2018-03-25  Pedro Alves  <palves@redhat.com>
12135
12136         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12137         if then/else bodies in var_func_name extraction.
12138
12139 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12140
12141         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12142         lookup_minimal_symbol() to find symbol entry.
12143         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12144
12145 2018-03-23  Keith Seitz  <keiths@redhat.com>
12146
12147         PR c++/22968
12148         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12149         nested type definitions for C++, too.
12150
12151 2018-03-23  Tom Tromey  <tom@tromey.com>
12152
12153         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12154         a typedef.
12155         (macho_register_oso): Remove.
12156         (macho_symtab_read): Take a std::vector.
12157         (oso_el_compare_name): Now a std::sort comparator.
12158         (macho_symfile_read_all_oso): Take a std::vector.
12159         (macho_symfile_read): Use std::vector.  Remove cleanups.
12160
12161 2018-03-22  Tom Tromey  <tom@tromey.com>
12162
12163         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12164         (record_full_goto_bookmark): Use std::string.
12165
12166 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12167
12168         PR tdep/18295
12169         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12170         a single mask.
12171
12172 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12173
12174         * rs6000-tdep.c (store_insn_p): New function.
12175         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12176         and cr_reg to their unshifted values. Use store_insn_p to
12177         match LR saves using either R1 or fdata->alloca_reg. Use
12178         store_insn_p to match CR saves. Set alloca_reg_offset
12179         when alloca_reg and framep are set. Remove lr_reg shift
12180         when assigning to fdata->lr_register.
12181
12182 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12183
12184         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12185         command line args instead of emitting a warning.
12186
12187 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12188
12189         * tracepoint.h (struct static_tracepoint_marker): Initialize
12190         fields, define default constructor, move constructor and move
12191         assignment, disable the rest.
12192         <str_id, extra>: Make std::string.
12193         (release_static_tracepoint_marker): Remove.
12194         (free_current_marker): Remove.
12195         * tracepoint.c (free_current_marker): Remove.
12196         (parse_static_tracepoint_marker_definition): Adjust to
12197         std::string, use new hex2str overload.
12198         (release_static_tracepoint_marker): Remove.
12199         (print_one_static_tracepoint_marker): Get marker by reference
12200         and adjust to std::string.
12201         (info_static_tracepoint_markers_command): Adjust to std::vector
12202         changes
12203         * target.h (static_tracepoint_marker_p): Remove typedef.
12204         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12205         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12206         bool.
12207         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12208         * target-debug.h
12209         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12210         (target_debug_print_std_vector_static_tracepoint_marker): New.
12211         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12212         to...
12213         (target_debug_print_static_tracepoint_marker_p): ... this.
12214         * target-delegates.c: Re-generate.
12215         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12216         Make std::string.
12217         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12218         (decode_static_tracepoint_spec): Adjust to std::vector.
12219         (tracepoint_print_one_detail): Adjust to std::string.
12220         (strace_marker_decode_location): Adjust to std::string.
12221         (update_static_tracepoint): Adjust to std::string, remove call
12222         to release_static_tracepoint_marker.
12223         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12224         Adjust to std::vector.
12225         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12226         (remote_static_tracepoint_markers_by_strid): Adjust to
12227         std::vector.
12228         * common/rsp-low.h (hex2str): New overload with explicit count
12229         of bytes.
12230         * common/rsp-low.c (hex2str): New overload with explicit count
12231         of bytes.
12232         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12233         (_initialize_rsp_low_selftests): Add test_hex2str test.
12234         * unittests/tracepoint-selftests.c
12235         (test_parse_static_tracepoint_marker_definition): Adjust to
12236         std::string.
12237
12238 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12239
12240         * tracepoint.c (parse_static_tracepoint_marker_definition):
12241         Consider case where the definition is followed by more
12242         definitions.
12243         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12244         tracepoint-selftests.c.
12245         * unittests/tracepoint-selftests.c: New.
12246
12247 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12248
12249         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12250         Carvalho.
12251
12252 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12253
12254         * symtab.c (find_pc_sect_line): fixed indentation.
12255
12256 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12257
12258         * symtab.c (find_pc_sect_line): now uses binary search.
12259
12260 2018-03-19  Tom Tromey  <tom@tromey.com>
12261
12262         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12263         "IDENT" production.
12264
12265 2018-03-19  Pedro Alves  <palves@redhat.com>
12266             Tom Tromey  <tom@tromey.com>
12267
12268         * unittests/observable-selftests.c: New file.
12269         * common/observable.h: New file.
12270         * observable.h: New file.
12271         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12272         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12273         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12274         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12275         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12276         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12277         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12278         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12279         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12280         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12281         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12282         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12283         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12284         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12285         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12286         tui/tui-interp.c, valops.c: Update all users.
12287         * tui/tui-hooks.c (tui_bp_created_observer)
12288         (tui_bp_deleted_observer, tui_bp_modified_observer)
12289         (tui_inferior_exit_observer, tui_before_prompt_observer)
12290         (tui_normal_stop_observer, tui_register_changed_observer):
12291         Remove.
12292         (tui_observers_token): New global.
12293         (attach_or_detach, tui_attach_detach_observers): New functions.
12294         (tui_install_hooks, tui_remove_hooks): Use
12295         tui_attach_detach_observers.
12296         * record-btrace.c (record_btrace_thread_observer): Remove.
12297         (record_btrace_thread_observer_token): New global.
12298         * observer.sh: Remove.
12299         * observer.c: Rename to observable.c.
12300         * observable.c (namespace gdb_observers): Define new objects.
12301         (observer_debug): Move into gdb_observers namespace.
12302         (struct observer, struct observer_list, xalloc_observer_list_node)
12303         (xfree_observer_list_node, generic_observer_attach)
12304         (generic_observer_detach, generic_observer_notify): Remove.
12305         (_initialize_observer): Update.
12306         Don't include observer.inc.
12307         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12308         (clean mostlyclean): Likewise.
12309         (observer.h, observer.inc): Remove targets.
12310         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12311         (COMMON_SFILES): Use observable.c, not observer.c.
12312         * .gitignore: Remove observer.h.
12313
12314 2018-03-18  Tom Tromey  <tom@tromey.com>
12315
12316         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12317         gdb::def_vector.
12318         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12319
12320 2018-03-17  Tom Tromey  <tom@tromey.com>
12321
12322         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12323
12324 2018-03-17  Tom Tromey  <tom@tromey.com>
12325
12326         * target.c (class scoped_target_fd): New.
12327         (target_fileio_close_cleanup): Remove.
12328         (target_fileio_read_alloc_1): Use scoped_target_fd.
12329
12330 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12331
12332         * silent-rules.mk: New.
12333         * Makefile.in: Include silent-rules.mk
12334         (srcdir, VPATH, top_srcdir): Move up.
12335         (COMPILE): Add ECHO_CXX.
12336         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12337         (init.c): Add ECHO_INIT_C.
12338         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12339         (version.c): Add ECHO_GEN.
12340         (printcmd.o): Add ECHO_CXX.
12341         (target-float.o): Add ECHO_CXX.
12342         (ada-exp.o): Add ECHO_CXX.
12343         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12344         (insight$(EXEEXT)): Add ECHO_CXXLD.
12345         * gnulib/configure.ac: Add AM_SILENT_RULES.
12346         * gnulib/aclocal.m4: Re-generate.
12347         * gnulib/configure: Re-generate.
12348         * gnulib/import/Makefile.in: Re-generate.
12349
12350 2018-03-16  Tom Tromey  <tom@tromey.com>
12351
12352         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12353         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12354         * utils.c (do_free_section_addr_info)
12355         (make_cleanup_free_section_addr_info): Remove.
12356         * symfile.h (struct other_sections): Add constructor.
12357         (struct section_addr_info): Remove.
12358         (section_addr_info): New typedef.
12359         (struct sym_fns) <sym_offsets>: Change type of parameter.
12360         (build_section_addr_info_from_objfile)
12361         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12362         (default_symfile_offsets, symbol_file_add)
12363         (symbol_file_add_from_bfd)
12364         (build_section_addr_info_from_section_table): Update.
12365         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12366         * symfile.c (alloc_section_addr_info): Remove.
12367         (build_section_addr_info_from_section_table): Change return type.
12368         Update.
12369         (build_section_addr_info_from_bfd)
12370         (build_section_addr_info_from_objfile): Likewise.
12371         (free_section_addr_info): Remove.
12372         (relative_addr_info_to_section_offsets): Change type of "addrs".
12373         (addrs_section_compar): Now a std::sort comparator.
12374         (addrs_section_sort): Change return type.
12375         (addr_info_make_relative): Change type of "addrs".  Update.
12376         (default_symfile_offsets, syms_from_objfile_1)
12377         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12378         (symbol_file_add_separate): Update.
12379         (symbol_file_add): Change type of "addrs".  Update.
12380         (add_symbol_file_command): Update.  Remove cleanups.
12381         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12382         cleanups.
12383         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12384         * solib.c (solib_read_symbols): Update.
12385         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12386         * machoread.c (macho_symfile_offsets): Update.
12387         * jit.c (jit_bfd_try_read_symtab): Update.
12388
12389 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12390
12391         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12392         unittests/utils-selftests.c.
12393         * unittests/utils-selftests.c: New file.
12394
12395 2018-03-14  Tom Tromey  <tom@tromey.com>
12396
12397         PR cli/14977:
12398         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12399         for NULL.
12400
12401 2018-03-14  Tom Tromey  <tom@tromey.com>
12402
12403         PR cli/19918:
12404         * printcmd.c (printf_pointer): Allow "-" in format.
12405
12406 2018-03-14  Tom Tromey  <tom@tromey.com>
12407
12408         * printcmd.c (_initialize_printcmd): Add usage to printf.
12409
12410 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12411
12412         * MAINTAINERS: Update my email address.
12413
12414 2018-03-13  Tom Tromey  <tom@tromey.com>
12415
12416         * machoread.c (macho_check_dsym): Change filenamep to a
12417         std::string*.
12418         (macho_symfile_read): Update.
12419         * symfile.c (load_command): Use std::string.
12420
12421 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12422
12423         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12424         to error message string.
12425         (riscv_register_name): Use xsnprintf instead of sprintf.
12426         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12427         internal_error.
12428         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12429         error.
12430         (riscv_push_dummy_call): Likewise.
12431
12432 2018-03-12  Tom Tromey  <tom@tromey.com>
12433
12434         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12435         Use gdb::byte_vector.
12436         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12437
12438 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12439
12440         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12441         parameter type to readable_regcache.
12442         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12443         the declaration.
12444
12445 2018-03-11  Tom Tromey  <tom@tromey.com>
12446
12447         * dwarf2read.c (struct nextfield): Add initializers.
12448         (struct nextfnfield): Remove.
12449         (struct fnfieldlist): Add initializers.  Remove "length" and
12450         "head", use std::vector.
12451         (struct decl_field_list): Remove.
12452         (struct field_info): Add initializers.
12453         <fields, baseclasses>: Now std::vector.
12454         <nbaseclasses, nfnfields, typedef_field_list_count,
12455         nested_types_list_count>: Remove.
12456         (dwarf2_add_field, dwarf2_add_type_defn)
12457         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12458         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12459         (process_structure_scope): Update.
12460
12461 2018-03-11  Tom Tromey  <tom@tromey.com>
12462
12463         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12464         for use by std::sort.
12465         (build_type_psymtabs_1): Use std::vector.
12466
12467 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12468
12469         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12470         and LIBMPFR in the printed configuration.
12471
12472 2018-03-08  Tom Tromey  <tom@tromey.com>
12473
12474         * source.c (get_filename_and_charpos): Use scoped_fd.
12475         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12476         (procfs_pidlist): Likewise.
12477         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12478         (iterate_over_mappings): Likewise.
12479
12480 2018-03-08  Tom Tromey  <tom@tromey.com>
12481
12482         * infcall.c (struct call_return_meta_info)
12483         <stack_temporaries_enabled>: Remove.
12484         (get_call_return_value, call_function_by_hand_dummy): Update.
12485         * thread.c (disable_thread_stack_temporaries): Remove.
12486         (enable_thread_stack_temporaries): Remove.
12487         (thread_stack_temporaries_enabled_p): Return bool.
12488         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12489         (get_last_thread_stack_temporary): Update.
12490         * eval.c (evaluate_subexp): Update.
12491         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12492         class, not a function.
12493         (value_ptr, value_vec): Remove typedefs.
12494         (class thread_info) <stack_temporaries_enabled>: Now bool.
12495         <stack_temporaries>: Now a std::vector.
12496         (thread_stack_temporaries_enabled_p)
12497         (value_in_thread_stack_temporaries): Return bool.
12498
12499 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12500
12501         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12502         (getpkt_or_notif_sane_1): Likewise.
12503
12504 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12505
12506         * build-id.c (build_id_to_debug_bfd): Use std::string.
12507
12508 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12509
12510         * build-id.c (find_separate_debug_file_by_buildid): Return
12511         std::string.
12512         * build-id.h (find_separate_debug_file_by_buildid): Return
12513         std::string.
12514         * coffread.c (coff_symfile_read): Adjust to std::string.
12515         * elfread.c (elf_symfile_read): Adjust to std::string.
12516         * symfile.c (separate_debug_file_exists): Change parameter to
12517         std::string.
12518         (find_separate_debug_file): Return std::string.
12519         (find_separate_debug_file_by_debuglink): Return std::string.
12520         * symfile.h (find_separate_debug_file_by_debuglink): Return
12521         std::string.
12522
12523 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12524
12525         * common/xml-utils.c (xml_escape_text): Move code to...
12526         (xml_escape_text_append): ... this new function.
12527         * common/xml-utils.h (xml_escape_text_append): New declaration.
12528         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12529         New function.
12530         (_initialize_xml_utils): register test_xml_escape_text_append as
12531         a selftest.
12532
12533 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12534
12535         * defs.h: Remove MAX_REGISTER_SIZE.
12536         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12537         asserts.
12538         * python/py-unwind.c (pyuw_sniffer): Likewise.
12539
12540 2018-03-07  Tom Tromey  <tom@tromey.com>
12541
12542         * linux-tdep.c (linux_info_proc): Update.
12543         * target.h (struct target_ops) <to_fileio_readlink>: Return
12544         optional<string>.
12545         (target_fileio_readlink): Return optional<string>.
12546         * remote.c (remote_hostio_readlink): Return optional<string>.
12547         * inf-child.c (inf_child_fileio_readlink): Return
12548         optional<string>.
12549         * target.c (target_fileio_readlink): Return optional<string>.
12550
12551 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12552
12553         * regcache.c (cooked_read_test): Add riscv to the list of
12554         architectures that have a save_reggroup.
12555
12556 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12557
12558         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12559         value is not a dynamic class object.
12560
12561 2018-03-06  Tom Tromey  <tom@tromey.com>
12562
12563         * rust-exp.y: Formatting fixes.
12564
12565 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12566
12567         * riscv-tdep.c (riscv_register_name): Remove target description
12568         support.
12569         (riscv_gdbarch_init): Remove target description check.
12570
12571 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12572
12573         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12574         comment.
12575         * riscv-tdep.h: Likewise.
12576
12577 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12578
12579         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12580         (riscv_pseudo_register_write): Delete.
12581         (riscv_gdbarch_init): Remove all use of pseudo registers.
12582
12583 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12584
12585         * record-btrace.c (btrace_print_lines): Replace cleanup
12586         parameter with RAII equivalents.
12587         (btrace_insn_history): Replace cleanup with RAII equivalents.
12588         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12589         make_cleanup_ui_out_tuple_begin_end): Remove.
12590         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12591         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12592         make_cleanup_ui_out_list_begin_end): Remove.
12593
12594 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12595
12596         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12597         parameter types to std::vector.  Use bool.
12598         (record_btrace_wait): Replace VEC(tp_t) with
12599         std::vector<thread_info *>.
12600         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12601
12602 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12603
12604         * record-btrace.c (record_btrace_disable_callback): Remove.
12605         (struct scoped_btrace_disable): New.
12606         (record_btrace_open): Use scoped_btrace_disable.
12607
12608 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12609
12610         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12611         reading values from registers.
12612
12613 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12614
12615         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12616         where appropriate.
12617
12618 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12619
12620         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12621         change parameter type.  Use GDB's print functions, and use
12622         core_addr_to_string where appropriate.
12623         (riscv_push_dummy_call): Use core_addr_to_string where
12624         appropriate, update call to riscv_print_arg_location, and reindent
12625         a few lines.
12626         (riscv_return_value): Update call to riscv_print_arg_location.
12627
12628 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12629             Tim Newsome <tim@sifive.com>
12630             Albert Ou <a0u@eecs.berkeley.edu>
12631             Darius Rad <darius@bluespec.com>
12632
12633         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12634         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12635         (ALLDEPFILES): Add riscv-tdep.c
12636         * configure.tgt: Add riscv support.
12637         * riscv-tdep.c: New file.
12638         * riscv-tdep.h: New file.
12639         * NEWS: Mention new target.
12640         * MAINTAINERS: Add entry for riscv.
12641
12642 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12643
12644         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12645         fields within aggregates.
12646
12647 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12648
12649         * record-btrace.c (btrace_print_lines): Change type of flags to
12650         gdb_disassembly_flags.
12651
12652 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12653
12654         * fbsd-nat.c: Include "inf-ptrace.h".
12655         (USE_SIGTRAP_SIGINFO): Conditionally define.
12656         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12657         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12658         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12659         function.
12660         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12661         Likewise.
12662         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12663         Likewise.
12664         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12665         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12666         "supports_stopped_by_hw_breakpoint" target methods.
12667
12668 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12669
12670         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12671         * fbsd-nat.c (debug_fbsd_nat): New variable.
12672         (show_fbsd_nat_debug): New function.
12673         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12674         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12675
12676 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12677
12678         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12679         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12680         prototype.
12681         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12682         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12683         method.
12684
12685 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12686
12687         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12688         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12689
12690 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12691
12692         * charset.c (struct charset_vector): New.
12693         (charsets): Change type to charset_vector.
12694         (find_charset_names): Adjust.
12695         (add_one): Adjust.
12696         (_initialize_charset): Adjust.
12697
12698 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12699
12700         * progspace.h (struct program_space) <deleted_solibs>: Change
12701         type to std::vector<std::string>.
12702         * progspace.c (clear_program_space_solib_cache): Adjust.
12703         * breakpoint.c (print_solib_event): Adjust.
12704         (check_status_catch_solib): Adjust.
12705         * solib.c (update_solib_list): Adjust.
12706         * ui-out.h (class ui_out) <field_string>: New overload.
12707         * ui-out.c (ui_out::field_string): New overload.
12708
12709 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12710
12711         * progspace.h (struct program_space): Add constructor and
12712         destructor, initialize fields.
12713         (add_program_space): Remove.
12714         * progspace.c (add_program_space): Rename to...
12715         (program_space::program_space): ... this.
12716         (release_program_space): Rename to...
12717         (program_space::~program_space): ... this.
12718         (delete_program_space): Use delete to delete program_space.
12719         (initialize_progspace): Use new to allocate program_space.
12720         * inferior.c (add_inferior_with_spaces): Likewise.
12721         (clone_inferior_command): Likewise.
12722         * infrun.c (follow_fork_inferior): Likewise.
12723         (handle_vfork_child_exec_or_exit): Likewise.
12724
12725 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12726
12727         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12728         (delim_string_to_char_ptr_vec): Return std::vector of
12729         gdb::unique_xmalloc_ptr.
12730         (dirnames_to_char_ptr_vec_append): Take std::vector of
12731         gdb::unique_xmalloc_ptr.
12732         (dirnames_to_char_ptr_vec): Return std::vector of
12733         gdb::unique_xmalloc_ptr.
12734         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12735         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12736         (delim_string_to_char_ptr_vec): Return an std::vector of
12737         gdb::unique_xmalloc_ptr, adjust the code.
12738         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12739         gdb::unique_xmalloc_ptr, adjust the code.
12740         (dirnames_to_char_ptr_vec): Return an std::vector of
12741         gdb::unique_xmalloc_ptr, adjust the code.
12742         * auto-load.c (auto_load_safe_path_vec): Change type to
12743         std::vector of gdb::unique_xmalloc_ptr.
12744         (auto_load_expand_dir_vars): Return an std::vector of
12745         gdb::unique_xmalloc_ptr, adjust the code.
12746         (auto_load_safe_path_vec_update): Adjust.
12747         (filename_is_in_auto_load_safe_path_vec): Adjust.
12748         (auto_load_objfile_script_1): Adjust.
12749         * build-id.c (build_id_to_debug_bfd): Adjust.
12750         * linux-thread-db.c (thread_db_load_search): Adjust.
12751         * source.c (add_path): Adjust.
12752         (openp): Adjust.
12753         * symfile.c (find_separate_debug_file): Adjust.
12754         * utils.c (do_free_char_ptr_vec): Remove.
12755         (make_cleanup_free_char_ptr_vec): Remove.
12756
12757 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12758
12759         PR gdb/22907
12760         * common/pathstuff.c: Conditionally include "<windows.h>".
12761
12762 2018-03-01  Georg Sauthoff  <mail@georg.so>
12763
12764         PR gdb/22888
12765         * gcore.in: Quote variables and switch interpreter to bash.
12766
12767 2018-03-01  Tom Tromey  <tom@tromey.com>
12768
12769         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12770         assertion.  Add assertion for discriminant_index.
12771         (quirk_rust_enum): Use correct base type name in univariant case.
12772
12773 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12774
12775         * record.c (get_call_history_modifiers): Return a
12776         record_print_flags.
12777         (cmd_record_call_history): Adjust.
12778         * record-btrace.c (record_btrace_call_history): Adjust.
12779         (record_btrace_call_history_range): Adjust.
12780         (record_btrace_call_history_from): Adjust.
12781         * target-debug.h (target_debug_print_record_print_flags): New.
12782         * target-delegates.c: Re-generate.
12783         * target.c (target_call_history): Change flags type.
12784         (target_call_history_from): Likewise.
12785         (target_call_history_range): Likewise.
12786         * target.h (struct target_ops) <target_call_history>: Likewise.
12787         (target_call_history_from): Likewise.
12788         (target_call_history_range): Likewise.
12789
12790 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12791             Simon Marchi  <simon.marchi@polymtl.ca>
12792
12793         * common/common-utils.c: Include "sys/stat.h".
12794         (is_regular_file): Move here from "source.c"; change return
12795         type to "bool".
12796         * common/common-utils.h (is_regular_file): New prototype.
12797         * common/pathstuff.c (contains_dir_separator): New function.
12798         * common/pathstuff.h (contains_dir_separator): New prototype.
12799         * source.c: Don't include "sys/stat.h".
12800         (is_regular_file): Move to "common/common-utils.c".
12801
12802 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12803
12804         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12805         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12806         * auto-load.c: Include "common/pathstuff.h".
12807         * common/common-def.h (current_directory): Move here.
12808         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12809         function.
12810         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12811         prototype.
12812         * common/pathstuff.c: New file.
12813         * common/pathstuff.h: New file.
12814         * compile/compile.c: Include "common/pathstuff.h".
12815         * defs.h (current_directory): Move to "common/common-defs.h".
12816         * dwarf2read.c: Include "common/pathstuff.h".
12817         * exec.c: Likewise.
12818         * guile/scm-safe-call.c: Likewise.
12819         * linux-thread-db.c: Likewise.
12820         * main.c: Likewise.
12821         * nto-tdep.c: Likewise.
12822         * objfiles.c: Likewise.
12823         * source.c: Likewise.
12824         * symtab.c: Likewise.
12825         * utils.c: Include "common/pathstuff.h".
12826         (gdb_realpath): Move to "common/pathstuff.c".
12827         (gdb_realpath_keepfile): Likewise.
12828         (gdb_abspath): Likewise.
12829         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12830         (gdb_realpath_keepfile): Likewise.
12831         (gdb_abspath): Likewise.
12832
12833 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12834
12835         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12836         wildcard process pid for super_resume for kernels with a
12837         specific bug.
12838
12839 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12840
12841         * compile/compile.c (get_args): Add additional comments
12842         explaining function.
12843
12844 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12845             Tom Tromey  <tom@tromey.com>
12846
12847         * target.h (memory_write_request_s): Remove typedef.  Don't define
12848         VEC.
12849         (target_write_memory_blocks): Change argument to std::vector.
12850         (struct memory_write_request): Add constructor.
12851         * target-memory.c (compare_block_starting_address): Return bool.
12852         Change argument types.
12853         (claim_memory): Change arguments to use std::vector.
12854         (split_regular_and_flash_blocks, blocks_to_erase)
12855         (compute_garbled_blocks): Likewise.
12856         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12857         (target_write_memory_blocks): Change argument to std::vector.
12858         * symfile.c (struct load_section_data): Add constructor and
12859         destructor.  Use std::vector for "requests".
12860         (struct load_progress_data): Add initializers.
12861         (load_section_callback): Update.  Use "new".
12862         (clear_memory_write_data): Remove.
12863         (generic_load): Update.
12864
12865 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12866
12867         * arch/aarch64.h: Use common/tdesc.h.
12868
12869 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12870
12871         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12872         architecture with a 64-bit ABI.
12873
12874 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12875
12876         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12877         ahead of target description loading.
12878
12879 2018-02-26  Tom Tromey  <tom@tromey.com>
12880
12881         * stack.c (backtrace_command_1): Update.
12882         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12883         of "flags".
12884         * python/py-framefilter.c (py_print_frame)
12885         (gdbpy_apply_frame_filter): Change type of "flags".
12886         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12887         of "flags".
12888         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12889         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12890         * extension.h (enum frame_filter_flag): Rename from
12891         frame_filter_flags.
12892         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12893         (apply_ext_lang_frame_filter): Change type of "flags".
12894         * extension.c (apply_ext_lang_frame_filter): Change type of
12895         "flags".
12896         * extension-priv.h (struct extension_language_ops)
12897         <apply_frame_filter>: Change type of "flags".
12898
12899 2018-02-26  Tom Tromey  <tom@tromey.com>
12900
12901         PR python/16497:
12902         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12903         off-by-one in py_end computation.
12904         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12905         PRINT_MORE_FRAMES.
12906         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12907         constant.
12908
12909 2018-02-26  Tom Tromey  <tom@tromey.com>
12910
12911         * dwarf2read.c (struct variant_field): New.
12912         (struct nextfield) <variant>: New field.
12913         (dwarf2_add_field): Handle DW_TAG_variant_part.
12914         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12915         discriminated union.
12916         (read_structure_type): Handle DW_TAG_variant_part.
12917         (handle_struct_member_die): New function, extracted from
12918         process_structure_scope.  Handle DW_TAG_variant.
12919         (process_structure_scope): Handle discriminated unions.  Call
12920         handle_struct_member_die.
12921
12922 2018-02-26  Tom Tromey  <tom@tromey.com>
12923
12924         * rust-lang.h (rust_last_path_segment): Declare.
12925         * rust-lang.c (rust_last_path_segment): Now public.  Change
12926         contract.
12927         (struct disr_info): Remove.
12928         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12929         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12930         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12931         (rust_enum_p, rust_enum_variant): New function.
12932         (rust_underscore_fields): Remove "offset" parameter.
12933         (rust_print_enum): New function.
12934         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12935         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12936         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12937         enums.
12938         (rust_internal_print_type): New function, from rust_print_type.
12939         Remove enum code.
12940         (rust_print_type): Call rust_internal_print_type.
12941         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12942         Update enum handling.
12943         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12944         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12945         (rust_union_quirks): New functions.
12946         (process_full_comp_unit, process_full_type_unit): Call
12947         rust_union_quirks.
12948         (process_structure_scope): Update rust_unions if necessary.
12949
12950 2018-02-26  Tom Tromey  <tom@tromey.com>
12951
12952         * value.h (value_union_variant): Declare.
12953         * valops.c (value_union_variant): New function.
12954         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12955         (struct discriminant_info): New.
12956         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12957         enumerator.
12958         (struct main_type) <flag_discriminated_union>: New field.
12959
12960 2018-02-26  Tom Tromey  <tom@tromey.com>
12961
12962         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12963         unittests/unpack-selftests.c.
12964         * unittests/unpack-selftests.c: New file.
12965         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12966
12967 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12968
12969         * dwarf2read.c (struct partial_die_info) <read>: New method.
12970         (read_partial_die): Remove the declaration.
12971         (load_partial_dies): Update.
12972         (partial_die_info::partial_die_info):
12973         (read_partial_die): Change it to partial_die_info::read.
12974
12975 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12976
12977         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12978         (fixup_partial_die): Remove declaration.
12979         (scan_partial_symbols): Update.
12980         (partial_die_parent_scope): Likewise.
12981         (partial_die_full_name): Likewise.
12982         (fixup_partial_die): Change it to partial_die_info::fixup.
12983
12984 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12985
12986         * dwarf2read.c (read_partial_die): Update the declaration.
12987         (load_partial_dies): Caller update.
12988         (read_partial_die): Remove one argument abbrev_len.
12989
12990 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12991
12992         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12993         assignment operator.
12994         (load_partial_dies): Use ctor and copy ctor.
12995         (read_partial_die): Update.
12996         (dwarf2_cu::find_partial_die): Use ctor.
12997
12998 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12999
13000         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13001         (find_partial_die_in_comp_unit): Change it to
13002         dwarf2_cu::find_partial_die.
13003         (find_partial_die): Update.
13004
13005 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13006
13007         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13008         is NULL.
13009
13010 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13011
13012         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13013
13014 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13015
13016         * arch/amd64.h: Use common/tdesc.h.
13017         * arch/i386.c: Likewise.
13018         * arch/i386.h: Likewise.
13019         * arch/tic6x.c: Likewise.
13020         * arch/tdesc.h: Move file from here...
13021         * common/tdesc.h: ...to here.
13022         * features/aarch64-core.c: Regenerate.
13023         * features/aarch64-fpu.c: Regenerate.
13024         * features/i386/32bit-avx.c: Regenerate.
13025         * features/i386/32bit-avx512.c: Regenerate.
13026         * features/i386/32bit-core.c: Regenerate.
13027         * features/i386/32bit-linux.c: Regenerate.
13028         * features/i386/32bit-mpx.c: Regenerate.
13029         * features/i386/32bit-pkeys.c: Regenerate.
13030         * features/i386/32bit-sse.c: Regenerate.
13031         * features/i386/64bit-avx.c: Regenerate.
13032         * features/i386/64bit-avx512.c: Regenerate.
13033         * features/i386/64bit-core.c: Regenerate.
13034         * features/i386/64bit-linux.c: Regenerate.
13035         * features/i386/64bit-mpx.c: Regenerate.
13036         * features/i386/64bit-pkeys.c: Regenerate.
13037         * features/i386/64bit-segments.c: Regenerate.
13038         * features/i386/64bit-sse.c: Regenerate.
13039         * features/i386/x32-core.c: Regenerate.
13040         * features/tic6x-c6xp.c: Regenerate.
13041         * features/tic6x-core.c: Regenerate.
13042         * features/tic6x-gp.c: Regenerate.
13043         * target-descriptions.c: Use common/tdesc.h.
13044         * target-descriptions.h: Likewise.
13045
13046 2018-02-24  Tom Tromey  <tom@tromey.com>
13047
13048         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13049         (try_thread_db_load_from_dir, thread_db_load_search): Use
13050         std::string.
13051         (info_auto_load_libthread_db_compare): Return bool.  Change
13052         argument types.
13053         (info_auto_load_libthread_db): Use std::vector, std::string.
13054         Remove cleanups.
13055
13056 2018-02-24  Tom Tromey  <tom@tromey.com>
13057
13058         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13059         std::string.
13060         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13061         std::string*.
13062         * gdbarch.c: Rebuild.
13063         * gdbarch.h: Rebuild.
13064         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13065         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13066         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13067         std::string*.
13068
13069 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13070
13071         * gdbtypes.h (sect_offset): Change type to uint64_t.
13072         (sect_offset_str): New function.
13073         * dwarf2read.c (create_addrmap_from_aranges): Use
13074         sect_offset_str.
13075         (error_check_comp_unit_head): Likewise.
13076         (create_debug_type_hash_table): Likewise.
13077         (read_cutu_die_from_dwo): Likewise.
13078         (init_cutu_and_read_dies): Likewise.
13079         (init_cutu_and_read_dies_no_follow): Likewise.
13080         (process_psymtab_comp_unit_reader): Likewise.
13081         (partial_die_parent_scope): Likewise.
13082         (peek_die_abbrev): Likewise.
13083         (process_queue): Likewise.
13084         (dwarf2_physname): Likewise.
13085         (read_namespace_alias): Likewise.
13086         (read_import_statement): Likewise.
13087         (create_dwo_cu_reader): Likewise.
13088         (create_cus_hash_table): Likewise.
13089         (lookup_dwo_cutu): Likewise.
13090         (inherit_abstract_dies): Likewise.
13091         (read_func_scope): Likewise.
13092         (read_call_site_scope): Likewise.
13093         (dwarf2_add_member_fn): Likewise.
13094         (read_common_block): Likewise.
13095         (read_module_type): Likewise.
13096         (read_typedef): Likewise.
13097         (read_subrange_type): Likewise.
13098         (load_partial_dies): Likewise.
13099         (read_partial_die): Likewise.
13100         (find_partial_die): Likewise.
13101         (read_str_index): Likewise.
13102         (dwarf2_string_attr): Likewise.
13103         (build_error_marker_type): Likewise.
13104         (lookup_die_type): Likewise.
13105         (dump_die_shallow): Likewise.
13106         (follow_die_ref): Likewise.
13107         (dwarf2_fetch_die_loc_sect_off): Likewise.
13108         (dwarf2_fetch_constant_bytes): Likewise.
13109         (follow_die_sig): Likewise.
13110         (get_signatured_type): Likewise.
13111         (get_DW_AT_signature_type): Likewise.
13112         (dwarf2_find_containing_comp_unit): Likewise.
13113         (set_die_type): Likewise.
13114
13115 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13116
13117         * arch/aarch64.c: Include "common-defs.h".
13118         * arch/amd64.c: Likewise.
13119         * arch/i386.c: Likewise.
13120
13121 2018-02-21  Tom Tromey  <tom@tromey.com>
13122
13123         * value.h: (extract_field_op): Update.
13124         * eval.c (extract_field_op): Return a const char *.
13125         * expression.h (parse_expression_for_completion): Update.
13126         * completer.c (complete_expression): Update.
13127         (add_struct_fields): Make fieldname const.
13128         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13129         (mark_completion_tag, parse_exp_in_context_1): Update.
13130         (parse_expression_for_completion): Change "name" to
13131         unique_xmalloc_ptr*.
13132
13133 2018-02-21  Tom Tromey  <tom@tromey.com>
13134
13135         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13136
13137 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13138
13139         * avr-tdep.c (avr_read_pc): Change parameter type to
13140         readable_regcache.
13141         * gdbarch.sh (read_pc): Likewise.
13142         * gdbarch.c: Re-generated.
13143         * gdbarch.h: Re-generated.
13144         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13145         readable_regcache.
13146         * ia64-tdep.c (ia64_read_pc): Likewise.
13147         * mips-tdep.c (mips_read_pc): Likewise.
13148         * spu-tdep.c (spu_read_pc): Likewise.
13149
13150 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13151
13152         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13153         * regcache-dump.c: New file.
13154         * regcache.c: Move register_dump to regcache-dump.c.
13155         (maintenance_print_registers): Likewise.
13156         (maintenance_print_raw_registers): Likewise.
13157         (maintenance_print_cooked_registers): Likewise.
13158         (maintenance_print_register_groups): Likewise.
13159         (maintenance_print_remote_registers): Likewise.
13160         (_initialize_regcache): Likewise.
13161         * regcache.h (register_dump): Moved from regcache.c.
13162
13163 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13164
13165         * regcache.c (regcache::regcache): Update.
13166         (regcache::invalidate): Move it to detached_regcache::invalidate.
13167         (get_thread_arch_aspace_regcache): Update.
13168         (regcache::raw_update): Update.
13169         (regcache::cooked_read): Remove some code.
13170         (regcache::cooked_read_value): Likewise.
13171         (regcache::raw_write): Remove assert on m_readonly_p.
13172         (regcache::raw_supply_integer): Move it to
13173         detached_regcache::raw_supply_integer.
13174         (regcache::raw_supply_zeroed): Likewise.
13175         * regcache.h (detached_regcache) <raw_supply_integer>: New
13176         declaration.
13177         <raw_supply_zeroed, invalidate>: Likewise.
13178         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13179         <invalidate>: Likewise.
13180         <m_readonly_p>: Removed.
13181
13182 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13183
13184         * infcmd.c (get_return_value): Let stop_regs point to
13185         get_current_regcache.
13186         * regcache.c (regcache::regcache): Remove.
13187         (register_dump_reg_buffer): New class.
13188         (regcache_print): Adjust.
13189         * regcache.h (regcache): Remove constructors.
13190
13191 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13192
13193         * regcache.c (class register_dump): New class.
13194         (register_dump_regcache, register_dump_none): New class.
13195         (register_dump_remote, register_dump_groups): New class.
13196         (regcache_print): Update.
13197         * regcache.h (regcache_dump_what): Move it to regcache.c.
13198         (regcache) <dump>: Remove.
13199
13200 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13201
13202         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13203          reg_buffer_rw *.
13204         (jit_unwind_reg_set_impl): Call raw_supply.
13205         (jit_frame_sniffer): Use reg_buffer_rw.
13206         * record-full.c (record_full_core_regbuf): Change its type.
13207         (record_full_core_open_1): Use reg_buffer_rw.
13208         (record_full_close): Likewise.
13209         (record_full_core_fetch_registers): Use regcache->raw_supply.
13210         (record_full_core_store_registers): Likewise.
13211         * regcache.c (regcache::get_register_status): Move it to
13212         reg_buffer.
13213         (regcache_raw_set_cached_value): Remove.
13214         (regcache::raw_set_cached_value): Remove.
13215         (regcache::raw_write): Call raw_supply.
13216         (regcache::raw_supply): Move it to reg_buffer_rw.
13217         * regcache.h (regcache_raw_set_cached_value): Remove.
13218         (reg_buffer_rw): New class.
13219
13220 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13221
13222         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13223         readonly_detached_regcache.
13224         (dummy_frame_prev_register): Use regcache->cooked_read.
13225         * frame.c (frame_save_as_regcache): Change return type.
13226         (frame_pop): Update.
13227         * frame.h (frame_save_as_regcache): Update declaration.
13228         * inferior.h (get_infcall_suspend_state_regcache): Update
13229         declaration.
13230         * infrun.c (infcall_suspend_state) <registers>: use
13231         readonly_detached_regcache.
13232         (save_infcall_suspend_state): Don't use regcache_dup.
13233         (get_infcall_suspend_state_regcache): Change return type.
13234         * linux-fork.c (struct fork_info) <savedregs>: Change to
13235         readonly_detached_regcache.
13236         <pc>: New field.
13237         (fork_save_infrun_state): Don't use regcache_dup.
13238         (info_checkpoints_command): Adjust.
13239         * mi/mi-main.c (register_changed_p): Update declaration.
13240         (mi_cmd_data_list_changed_registers): Use
13241         readonly_detached_regcache.
13242         (register_changed_p): Change parameter type to
13243         readonly_detached_regcache.
13244         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13245         readonly_detached_regcache.
13246         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13247         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13248         New.
13249         (regcache::save): Move it to reg_buffer.
13250         (regcache::restore): Change parameter type.
13251         (regcache_dup): Remove.
13252         * regcache.h (reg_buffer) <save>: New method.
13253         (readonly_detached_regcache): New class.
13254         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13255         readonly_detached_regcache.
13256         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13257
13258 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13259
13260         * frame.c (frame_save_as_regcache): Use regcache method save.
13261         (frame_pop): Use regcache method restore.
13262         * infrun.c (restore_infcall_suspend_state): Likewise.
13263         * linux-fork.c (fork_load_infrun_state): Likewise.
13264         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13265         save.
13266         * regcache.c (regcache_save): Remove.
13267         (regcache::restore): More asserts.
13268         (regcache_cpy): Remove.
13269         * regcache.h (regcache_save): Remove the declaration.
13270         (regcache::restore): Move from private to public.
13271         Remove the friend declaration of regcache_cpy.
13272         (regcache_cpy): Remove declaration.
13273
13274 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13275
13276         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13277         parameter type to 'readable_regcache *'.
13278         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13279         * arm-tdep.c (arm_neon_quad_read): Likewise.
13280         (arm_pseudo_read): Likewise.
13281         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13282         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13283         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13284         * gdbarch.c: Re-generated.
13285         * gdbarch.h: Re-generated.
13286         * gdbarch.sh (pseudo_register_read): Change parameter type to
13287         'readable_regcache *'.
13288         (pseudo_register_read_value): Likewise.
13289         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13290         (h8300_pseudo_register_read): Likewise.
13291         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13292         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13293         (i386_pseudo_register_read_into_value): Likewise.
13294         (i386_pseudo_register_read_value): Likewise.
13295         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13296         declaration.
13297         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13298         * m32c-tdep.c (m32c_raw_read): Likewise.
13299         (m32c_read_flg): Likewise.
13300         (m32c_banked_register): Likewise.
13301         (m32c_banked_read): Likewise.
13302         (m32c_sb_read): Likewise.
13303         (m32c_part_read): Likewise.
13304         (m32c_cat_read): Likewise.
13305         (m32c_r3r2r1r0_read): Likewise.
13306         (m32c_pseudo_register_read): Likewise.
13307         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13308         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13309         (mep_pseudo_cr64_read): Likewise.
13310         (mep_pseudo_register_read): Likewise.
13311         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13312         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13313         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13314         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13315         (regcache::cooked_read): Likewise.
13316         (regcache::cooked_read_value): Likewise.
13317         (regcache_cooked_read_signed):
13318         (regcache::cooked_read): Likewise.
13319         * regcache.h (readable_regcache): New class.
13320         (regcache): Inherit readable_regcache.  Move some methods to
13321         readable_regcache.
13322         * rl78-tdep.c (rl78_pseudo_register_read): Change
13323         parameter type to 'readable_regcache *'.
13324         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13325         (e500_pseudo_register_read): Change parameter type to
13326         'readable_regcache *'.
13327         (dfp_pseudo_register_read): Likewise.
13328         (vsx_pseudo_register_read): Likewise.
13329         (efpr_pseudo_register_read): Likewise.
13330         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13331         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13332         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13333         (sh64_pseudo_register_read): Likewise.
13334         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13335         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13336         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13337         (spu_pseudo_register_read): Likewise.
13338         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13339         (xtensa_pseudo_register_read): Likewise.
13340
13341 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13342
13343         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13344         (regcache::arch): Move it to reg_buffer::arch.
13345         (regcache::register_buffer): Likewise.
13346         (regcache::assert_regnum): Likewise.
13347         (regcache::num_raw_registers): Likewise.
13348         * regcache.h (reg_buffer): New class.
13349         (regcache): Inherit reg_buffer.
13350
13351 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13352
13353         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13354         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13355
13356 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13357
13358         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13359
13360 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13361
13362         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13363         (SFILES): Remove common/*.c files.
13364         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13365         * common/common.host: Add common reference.
13366         * configure.ac: Likewise.
13367         * configure: Regenerate.
13368
13369 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13370
13371         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13372         (block_initialize_namespace): Use new.
13373         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13374         (dwarf2_free_objfile): Use delete.
13375         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13376         (copy_type_recursive): Use new.
13377         * gdb_obstack.h (allocate_on_obstack): New.
13378
13379 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13380
13381         PR gdb/22849
13382         * inferior.c (exit_inferior_1): Reset inf->control.
13383
13384 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13385
13386         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13387         declaration.
13388
13389 2018-02-14  Pedro Alves  <palves@redhat.com>
13390
13391         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13392         frame_cleanup_after_sniffer on exception.
13393
13394 2018-02-14  Tom Tromey  <tom@tromey.com>
13395
13396         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13397         const.
13398         (solib_bfd_open): Make pathname const.
13399         * solib.c (solib_bfd_open): Make pathname const.
13400         * solib-spu.c (spu_bfd_fopen): Make name const.
13401         (spu_bfd_open): Make pathname const.
13402         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13403         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13404
13405 2018-02-14  Tom Tromey  <tom@tromey.com>
13406
13407         * symfile.c (symfile_bfd_open): Update.
13408         * source.h (openp, source_full_path_of, find_and_open_source):
13409         Change argument type to unique_xmalloc_ptr.
13410         * source.c (openp): Take a unique_xmalloc_ptr.
13411         (source_full_path_of, find_and_open_source): Likewise.
13412         (open_source_file, symtab_to_fullname): Update.
13413         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13414         unique_xmalloc_ptr.
13415         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13416         (exec_file_find): Update.
13417         * psymtab.c (psymtab_to_fullname): Update.
13418         * nto-tdep.h (nto_find_and_open_solib): Update.
13419         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13420         unique_xmalloc_ptr.
13421         * exec.c (exec_file_attach): Update.
13422         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13423         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13424
13425 2018-02-14  Tom Tromey  <tom@tromey.com>
13426
13427         * solib.c: Include source.h.
13428         * nto-tdep.c: Include source.h.
13429         * mi/mi-cmd-env.c: Include source.h.
13430         * infcmd.c: Include source.h.
13431         * exec.c: Include source.h.
13432         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13433         (add_path, directory_switch, source_path, init_source_path): Move
13434         declarations...
13435         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13436         (add_path, directory_switch, source_path, init_source_path):
13437         ...here.
13438
13439 2018-02-14  Tom Tromey  <tom@tromey.com>
13440
13441         * solist.h (exec_file_find, solib_find): Return
13442         unique_xmalloc_ptr.
13443         (solib_bfd_fopen): Take a const char *.
13444         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13445         (exec_file_find, solib_find): Likewise.
13446         (solib_bfd_fopen): Do not take ownership of "pathname".
13447         (solib_bfd_open): Use unique_xmalloc_ptr.
13448         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13449         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13450         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13451         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13452
13453 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13454
13455         * ada-lang.c (name_match_type_from_name): Remove reference to
13456         ada_name_for_lookup in function's documentation.
13457         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13458
13459 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13460
13461         * defs.h (enum openp_flags): New enum.
13462         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13463         Move to enum openp_flags.
13464         (openp_flags): New enum flags.
13465         (openp): Change parameter type to openp_flags.
13466         * source.c (openp): Change parameter type to openp_flags.
13467         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13468         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13469
13470 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13471
13472         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13473         per-command.
13474
13475 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13476
13477         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13478         into...
13479         (class dwarf2_queue_guard): ...the destructor of this new class.
13480         (dw2_do_instantiate_symtab): Create instance of the new class
13481         dwarf2_queue_guard, remove cleanup.
13482
13483 2018-02-09  Tom Tromey  <tom@tromey.com>
13484
13485         * source.c (find_source_lines): Don't reference past the end of
13486         the vector.
13487
13488 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13489
13490         * remote.c (remote_btrace_maybe_reopen): Change error message.
13491         * btrace.c (btrace_enable): Likewise.
13492         (parse_xml_btrace): Likewise.
13493         (parse_xml_btrace_conf): Likewise.
13494
13495 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13496
13497         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13498         (linux_enable_pt, linux_enable_bts): Call
13499         diagnose_perf_event_open_fail.
13500
13501 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13502
13503         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13504         Remove parameter and change return type.  Update callers.  Move it.
13505         (linux_enable_bts, linux_enable_pt): Improve error message.
13506         (linux_enable_pt): Remove zero buffer size check.
13507         (linux_enable_btrace): Improve error messages.  Remove NULL return
13508         check.
13509
13510 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13511
13512         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13513         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13514         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13515         (linux_supports_pt, linux_supports_btrace): Remove.
13516         (linux_enable_bts): Call cpu_supports_bts.
13517         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13518         * remote.c (remote_supports_btrace): Remove.
13519         (init_remote_ops): Remove remote_supports_btrace.
13520         * target-delegates.c: Regenerated.
13521         * target.c (target_supports_btrace): Remove.
13522         * target.h (target_ops) <to_supports_btrace>: Remove
13523         (target_supports_btrace): Remove.
13524         * x86-linux-nat.c (x86_linux_create_target): Remove
13525         linux_supports_btrace.
13526
13527 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13528
13529         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13530         btrace failed.
13531         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13532         exception and use message in own exception.
13533
13534 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13535
13536         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13537         (perf_event_pt_event_type): Use gdb_file_up.
13538         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13539         scoped_fd, and scoped_mmap.
13540
13541 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13542
13543         * common/scoped_mmap.h: New.
13544         * unittests/scoped_mmap-selftest.c: New.
13545         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13546         unittests/scoped_mmap-selftest.c.
13547
13548 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13549
13550         * common/scoped_fd.h: New.
13551         * unittests/scoped_fd-selftest.c: New.
13552         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13553         unittests/scoped_fd-selftest.c.
13554
13555 2018-02-09  Tom Tromey  <tom@tromey.com>
13556
13557         * auto-load.c (auto_load_section_scripts): Use
13558         gdb::unique_xmalloc_ptr.
13559
13560 2018-02-09  Tom Tromey  <tom@tromey.com>
13561
13562         * auto-load.c (execute_script_contents): Use std::string.
13563
13564 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13565
13566         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13567         Python function, rather than a new command.
13568
13569 2018-02-08  Tom Tromey  <tom@tromey.com>
13570
13571         * solib.c (solib_find_1): Use std::string.
13572         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13573
13574 2018-02-08  Tom Tromey  <tom@tromey.com>
13575
13576         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13577
13578 2018-02-08  Tom Tromey  <tom@tromey.com>
13579
13580         * source.c (find_source_lines): Use gdb::def_vector.
13581
13582 2018-02-08  Tom Tromey  <tom@tromey.com>
13583
13584         * macrocmd.c (struct temporary_macro_definition): New.
13585         (macro_define_command): Use temporary_macro_definition.  Remove
13586         cleanups.
13587         (free_macro_definition_ptr): Remove.
13588
13589 2018-02-08  Tom Tromey  <tom@tromey.com>
13590
13591         * macroexp.c (maybe_expand): Use std::string.
13592
13593 2018-02-08  Tom Tromey  <tom@tromey.com>
13594
13595         * macroexp.c (struct macro_buffer): Add initializers for some
13596         members.
13597         (init_buffer, init_shared_buffer, free_buffer)
13598         (free_buffer_return_text): Remove.
13599         (macro_buffer): New constructors.
13600         (~macro_buffer): New destructor.
13601         (macro_buffer::set_shared): New method.
13602         (macro_buffer::resize_buffer, macro_buffer::appendc)
13603         (macro_buffer::appendmem): Now methods, not free functions.
13604         (set_token, append_tokens_without_splicing, stringify)
13605         (macro_stringify): Update.
13606         (gather_arguments): Change return type.  Remove argc_p argument,
13607         add args_ptr argument.  Use std::vector.
13608         (substitute_args): Remove argc argument.  Accept std::vector.
13609         (expand): Update.  Use std::vector.
13610         (scan, macro_expand, macro_expand_next): Update.
13611
13612 2018-02-08  Tom Tromey  <tom@tromey.com>
13613
13614         * symtab.c (default_collect_symbol_completion_matches_break_on):
13615         Use unique_xmalloc_ptr.
13616         * macroscope.h: (sal_macro_scope, user_macro_scope)
13617         (default_macro_scope): Return unique_xmalloc_ptr.
13618         * macroscope.c (sal_macro_scope, user_macro_scope)
13619         (default_macro_scope): Return unique_xmalloc_ptr.
13620         * macroexp.h (macro_expand, macro_expand_once): Return
13621         unique_xmalloc_ptr.
13622         * macroexp.c (macro_expand, macro_expand_once): Return
13623         unique_xmalloc_ptr.
13624         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13625         (info_macro_command, info_macros_command): Use
13626         unique_xmalloc_ptr.
13627         * compile/compile-c-support.c (write_macro_definitions): Use
13628         unique_xmalloc_ptr.
13629         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13630
13631 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13632
13633         * value.c (value_static_field): Assign field type instead of
13634         containing type when returning an optimized out value.
13635
13636 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13637
13638         * ft32-tdep.c (ft32_read_pc): Remove.
13639         (ft32_write_pc): Remove.
13640         (ft32_gdbarch_init): Update.
13641         * m32r-tdep.c (m32r_read_pc): Remove.
13642         (m32r_gdbarch_init): Update.
13643         * mep-tdep.c (mep_read_pc): Remove.
13644         (mep_gdbarch_init): Update.
13645         * microblaze-tdep.c (microblaze_write_pc): Remove.
13646         (microblaze_gdbarch_init): Update.
13647         * mn10300-tdep.c (mn10300_read_pc): Remove.
13648         (mn10300_write_pc): Remove.
13649         (mn10300_gdbarch_init): Update.
13650         * moxie-tdep.c (moxie_read_pc): Remove.
13651         (moxie_write_pc): Remove.
13652         (moxie_gdbarch_init): Update.
13653
13654 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13655
13656         * expprint.c (print_subexp_standard): Handle
13657         OP_F77_UNDETERMINED_ARGLIST.
13658         (dump_subexp_body_standard): Likewise.
13659
13660 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13661
13662         * target-descriptions.c (tdesc_element_visitor) Add empty
13663         implementations.
13664         (tdesc_type): Move make_gdb_type from here.
13665         (tdesc_type_builtin): Likewise.
13666         (tdesc_type_vector): Likewise.
13667         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13668         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13669         (make_gdb_type_union): Likewise.
13670         (make_gdb_type_flags): Likewise.
13671         (make_gdb_type_enum): Likewise.
13672         (make_gdb_type): New function.
13673         (tdesc_register_type): Use static make_gdb_type.
13674
13675 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13676
13677         * infcmd.c (default_print_one_register_info): Align natural-format
13678         column values consistently one under another.
13679         (pad_to_column): New function.
13680
13681 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13682
13683         * dwarf2read.c (dwarf2_physname): Move commment.
13684
13685 2018-02-01  Leszek Swirski  <leszeks@google.com>
13686
13687         * varobj.c (varobj_formatted_print_options): Allow recursive
13688         pretty printing if pretty printing is enabled.
13689
13690 2018-02-01  Leszek Swirski  <leszeks@google.com>
13691
13692         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13693         names after a structop as a filename.
13694
13695 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13696
13697         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13698         (arm_record_coproc_data_proc): Likewise.
13699
13700 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13701
13702         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13703
13704 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13705
13706         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13707         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13708
13709 2018-01-31  Pedro Alves  <palves@redhat.com>
13710
13711         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13712         * inflow.c (child_terminal_save_inferior): Wrap reference to
13713         tcgetpgrp in HAVE_TERMIOS_H.
13714         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13715         _WIN32.
13716         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13717         always iterate over all inferiors.
13718         (gdbsim_cntrl_c): Adjust.
13719         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13720
13721 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13722
13723         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13724         index type is objfile-owned if the element type is as well.
13725
13726 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13727
13728         GDB 8.1 released.
13729
13730 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13731
13732         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13733         "features/s390x-linux64.c".
13734         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13735         s390_linux32 and s390x_linux64.
13736         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13737         default tdesc.
13738         * s390-tdep.c: Include "features/s390-linux32.c" and
13739         "features/s390x-linux64.c".
13740         (s390_tdesc_valid): Add check for tdesc_has_registers.
13741         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13742         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13743         tdesc_s390x_linux64.
13744         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13745         tdesc_s390x_linux64 to...
13746         * s390-tdep.h: ...here.
13747
13748 2018-01-30  Pedro Alves  <palves@redhat.com>
13749
13750         PR gdb/13211
13751         * config.in, configure: Regenerate.
13752         * configure.ac: Check for getpgid.
13753         * go32-nat.c (go32_pass_ctrlc): New.
13754         (go32_target): Install it.
13755         * inf-child.c (inf_child_target): Install
13756         child_terminal_save_inferior, child_pass_ctrlc and
13757         child_interrupt.
13758         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13759         (inf_ptrace_target): No longer install it.
13760         * infcmd.c (interrupt_target_1): Adjust.
13761         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13762         (child_interrupt): Declare.
13763         (inferior::terminal_state): New.
13764         * inflow.c (struct terminal_info): Update comments.
13765         (inferior_process_group): Delete.
13766         (terminal_is_ours): Delete.
13767         (gdb_tty_state): New.
13768         (child_terminal_init): Adjust.
13769         (is_gdb_terminal, sharing_input_terminal_1)
13770         (sharing_input_terminal): New functions.
13771         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13772         Set the process's actual process group in the foreground if
13773         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13774         mark terminal as the inferior's if not sharing GDB's terminal.
13775         Don't check attach_flag.
13776         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13777         pass down a target_terminal_state.
13778         (child_terminal_save_inferior): New, factored out from ...
13779         (child_terminal_ours_1): ... this.  Handle
13780         target_terminal_state::is_ours_for_output.
13781         (child_interrupt, child_pass_ctrlc): New.
13782         (inflow_inferior_exit): Clear the inferior's terminal_state.
13783         (copy_terminal_info): Copy the inferior's terminal state.
13784         (_initialize_inflow): Remove reference to terminal_is_ours.
13785         * inflow.h (inferior_process_group): Delete.
13786         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13787         * procfs.c (procfs_target): Don't install procfs_interrupt.
13788         (procfs_interrupt): Delete.
13789         * remote.c (remote_serial_quit_handler): Adjust.
13790         (remote_interrupt): Remove ptid parameter.  Adjust.
13791         * target-delegates.c: Regenerate.
13792         * target.c: Include "terminal.h".
13793         (target_terminal::terminal_state): Rename to ...
13794         (target_terminal::m_terminal_state): ... this.
13795         (target_terminal::init): Adjust.
13796         (target_terminal::inferior): Adjust to per-inferior
13797         terminal_state.
13798         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13799         (target_terminal::ours, target_terminal::ours_for_output): Use
13800         target_terminal_is_ours_kind.
13801         (target_interrupt): Remove ptid parameter.  Adjust.
13802         (default_target_pass_ctrlc): Adjust.
13803         * target.h (target_ops::to_terminal_save_inferior): New field.
13804         (target_ops::to_interrupt): Remove ptid_t parameter.
13805         (target_interrupt): Remove ptid_t parameter.  Update comment.
13806         (target_pass_ctrlc): Update comment.
13807         * target/target.h (target_terminal_state): New scoped enum,
13808         factored out of ...
13809         (target_terminal::terminal_state): ... here.
13810         (target_terminal::inferior): Update comments.
13811         (target_terminal::restore_inferior): New.
13812         (target_terminal::is_inferior, target_terminal::is_ours)
13813         (target_terminal::is_ours_for_output): Adjust.
13814         (target_terminal::scoped_restore_terminal_state): Adjust to
13815         rename, and call restore_inferior() instead of inferior().
13816         (target_terminal::scoped_restore_terminal_state::m_state): Change
13817         type.
13818         (target_terminal::terminal_state): Rename to ...
13819         (target_terminal::m_terminal_state): ... this and change type.
13820
13821 2018-01-30  Pedro Alves  <palves@redhat.com>
13822
13823         * linux-nat.c (wait_for_signal): New function.
13824         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13825         directly.
13826         (async_terminal_is_ours)
13827         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13828         (linux_nat_add_target): Don't override
13829         to_terminal_inferior/to_terminal_ours.
13830
13831 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13832
13833         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13834
13835 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13836
13837         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13838         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13839         dwarf2_per_objfile_free here.
13840         (dwarf2_per_objfile_free): Remove.
13841         (_initialize_dwarf2_read): Don't register
13842         dwarf2_per_objfile_free as a registry cleanup.
13843
13844 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13845
13846         Avoid compilation errors in MinGW native builds
13847
13848         The error is triggered by including python-internal.h, and the
13849         error message is:
13850
13851              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13852                       from build-gnulib/import/math.h:27,
13853                       from d:/usr/Python26/include/pyport.h:235,
13854                       from d:/usr/Python26/include/Python.h:58,
13855                       from python/python-internal.h:94,
13856                       from python/py-arch.c:24:
13857              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13858         using ::hypot;
13859                 ^~~~~
13860
13861         This happens because Python headers define 'hypot' to expand t
13862         '_hypot' in the Windows builds.
13863         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13864         'hypoth'.  This avoids a compilation error.
13865
13866 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13867
13868         * MAINTAINERS (Write After Approval): Fix ordering.
13869
13870 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13871
13872         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13873
13874 2018-01-26  Alan Modra  <amodra@gmail.com>
13875
13876         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13877         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13878         Remove nop.  Make const.  Comment.
13879         (powerpc32_plt_stub_so_2): New.
13880         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13881         Correct count.  Update uses.
13882         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13883         Move common code reading PLT entry word.  Correct
13884         powerpc32_plt_stub PLT address calculation.
13885         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13886         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13887         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13888         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13889         (ppc64_standard_linkage8): Likewise.
13890         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13891         Correct insns description.
13892         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13893
13894 2018-01-24  Pedro Alves  <palves@redhat.com>
13895
13896         GCC PR libstdc++/83906
13897         * gdbtypes.c (operator==(const dynamic_prop &,
13898         const dynamic_prop &)): New.
13899         (operator==(const range_bounds &, const range_bounds &)): New.
13900         (check_types_equal): Use them instead of memcmp.
13901         * gdbtypes.h (operator==(const dynamic_prop &,
13902         const dynamic_prop &)): Declare.
13903         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13904         (operator==(const range_bounds &, const range_bounds &)): Declare.
13905         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13906
13907 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13908
13909         * s390-linux-tdep.c (s390_record_address_mask)
13910         (s390_record_calc_disp_common, s390_record_calc_disp)
13911         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13912         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13913         (s390_process_record): Move to s390-tdep.c.
13914         (s390_linux_init_abi_any): Adjust.
13915         * s390-tdep.c (s390_record_address_mask)
13916         (s390_record_calc_disp_common, s390_record_calc_disp)
13917         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13918         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13919         (s390_process_record): Moved from s390-linux-tdep.c
13920         (s390_gdbarch_init): Adjust.
13921
13922 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13923
13924         * s390-linux-nat.c (s390-tdep.h): New include.
13925         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13926         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13927         (ALLDEPFILES): Add s390-tdep.c.
13928         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13929         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13930         * s390-tdep.h: ...this.  New file.
13931         * s390-linux-tdep.c (s390-tdep.h): New include.
13932         (_initialize_s390_tdep): Rename to...
13933         (_initialize_s390_linux_tdep): ...this and adjust.
13934         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13935         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13936         s390-tdep.h.
13937         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13938         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13939         (s390_is_partial_instruction, s390_software_single_step)
13940         (is_non_branch_ril, s390_displaced_step_copy_insn)
13941         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13942         (s390_prologue_data, s390_addr, s390_store, s390_load)
13943         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13944         (s390_register_call_saved, s390_guess_tracepoint_registers)
13945         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13946         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13947         (s390_pseudo_register_name, s390_pseudo_register_type)
13948         (s390_pseudo_register_read, s390_pseudo_register_write)
13949         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13950         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13951         (s390_addr_bits_remove, s390_address_class_type_flags)
13952         (s390_address_class_type_flags_to_name)
13953         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13954         (s390_function_arg_float, s390_function_arg_vector)
13955         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13956         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13957         (s390_frame_align, s390_register_return_value, s390_return_value)
13958         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13959         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13960         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13961         (s390_trad_frame_prev_register, s390_unwind_cache)
13962         (s390_prologue_frame_unwind_cache)
13963         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13964         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13965         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13966         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13967         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13968         (s390_frame_base_address, s390_local_base_address)
13969         (s390_frame_base, s390_gcc_target_options)
13970         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13971         (s390_validate_reg_range, s390_tdesc_valid)
13972         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13973         * s390-tdep.c: ...this.  New file.
13974
13975 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13976
13977         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13978         (s390_process_record, s390_gdbarch_tdep_alloc)
13979         (s390_linux_init_abi_any): Use/set new hook.
13980
13981 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13982
13983         * s390-linux-tdep.c (osabi.h): New include.
13984         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13985         (s390_linux_init_abi_any): New functions.
13986         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13987
13988 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13989
13990         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13991         tdesc_has_registers check
13992
13993 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13994
13995         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13996         (s390_validate_reg_range): New macro.
13997         (s390_gdbarch_init): Adjust.
13998
13999 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14000
14001         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14002         (s390_gdbarch_tdep_alloc): Adjust.
14003         (s390_gdbarch_init): Adjust.
14004
14005 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14006
14007         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14008         <have_tdb>: Change type to bool.
14009         (s390_gdbarch_tdep_alloc): Adjust.
14010         (s390_gdbarch_init): Adjust.
14011
14012 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14013
14014         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14015         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14016         (s390_gdbarch_tdep_alloc): New function.
14017         (s390_gdbarch_init): Allocate tdep at start and use its fields
14018         instead of separate variables.
14019
14020 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14021
14022         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14023         when looking for cached gdbarch and add comment for remaining.
14024
14025 2018-01-22  Pedro Alves  <palves@redhat.com>
14026             Sergio Durigan Junior  <sergiodj@redhat.com>
14027
14028         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14029         case.
14030
14031 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14032
14033         * MAINTAINERS: Update my company e-mail address.
14034
14035 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14036
14037         * regcache.c (cooked_write_test): New function.
14038         (_initialize_regcache): Register the test.
14039
14040 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14041
14042         * ia64-tdep.c (ia64_pseudo_register_read): Call
14043         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14044         * m32c-tdep.c (m32c_cat_read): Likewise.
14045         (m32c_r3r2r1r0_read): Likewise.
14046         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14047         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14048
14049 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14050
14051         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14052         method raw_read instead of regcache_raw_read.
14053         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14054         * arm-tdep.c (arm_neon_quad_read): Likewise.
14055         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14056         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14057         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14058         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14059         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14060         (i386_pseudo_register_read_into_value): Likewise.
14061         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14062         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14063         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14064         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14065         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14066         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14067         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14068         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14069         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14070
14071 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14072
14073         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14074         * configure.tgt: Remove target mt.
14075         * mt-tdep.c: Remove.
14076         * regcache.c (cooked_read_test): Remove the check for mt.
14077
14078 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14079
14080         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14081         instead of gdbarch_pseudo_register_read_value.
14082
14083 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14084
14085         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14086         language is Ada.
14087
14088 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14089
14090         * linespec.c (create_sals_line_offset): Remove code that preserved
14091         the symtab_and_line's line number.
14092
14093 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14094
14095         * varobj.c (varobj_create): Don't set valid_block when creating a
14096         floating varobj.
14097
14098 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14099
14100         * varobj.c (varobj_create): Remove out of date comment.
14101
14102 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14103
14104         PR mi/20395
14105         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14106         updating innermost block.
14107         * parse.c (innermost_block_tracker::update): Take extra type
14108         parameter, and check types match before updating innermost block.
14109         (write_dollar_variable): Update innermost block for registers.
14110         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14111         (innermost_block_tracker::innermost_block_tracker): Initialise
14112         m_types member.
14113         (innermost_block_tracker::reset): Take type parameter.
14114         (innermost_block_tracker::update): Take type parameter, and pass
14115         type through as needed.
14116         (innermost_block_tracker::m_types): New member.
14117         * varobj.c (varobj_create): Pass type when reseting innermost
14118         block.
14119
14120 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14121
14122         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14123         * ada-lang.c (resolve_subexp): Likewise.
14124         * breakpoint.c (set_breakpoint_condition) Likewise.
14125         (watch_command_1) Likewise.
14126         * c-exp.y (variable): Likewise.
14127         * d-exp.y (PrimaryExpression): Likewise.
14128         * f-exp.y (variable): Likewise.
14129         * go-exp.y (variable): Likewise.
14130         * m2-exp.y (variable): Likewise.
14131         * objfiles.c (objfile::~objfile): Likewise.
14132         * p-exp.y (variable): Likewise.
14133         * parse.c (innermost_block): Change type.
14134         * parser-defs.h (class innermost_block_tracker): New.
14135         (innermost_block): Change to innermost_block_tracker.
14136         * printcmd.c (display_command): Switch to innermost_block API.
14137         (do_one_display): Likewise.
14138         * rust-exp.y (do_one_display): Likewise.
14139         * symfile.c (clear_symtab_users): Likewise.
14140         * varobj.c (varobj_create): Switch to innermost_block API, replace
14141         use of innermost_block with block stored on varobj object.
14142
14143 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14144
14145         * expression.h (innermost_block): Remove declaration.
14146         * varobj.c: Add 'parser-defs.h' include.
14147
14148 2018-01-19  Tom Tromey  <tom@tromey.com>
14149
14150         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14151         symbols in the static and global blocks.
14152
14153 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14154
14155         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14156         gdb_ptrace.h, and move including gdb_wait.h ...
14157         * nat/linux-ptrace.h: ... to here.
14158
14159 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14160
14161         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14162         inf_ptrace_detach_success.
14163         (inf_ptrace_detach_success): Add inferior parameter, use it
14164         instead of inferior_ptid, pass it to detach_inferior.
14165         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14166         parameter.
14167         * inferior.c (detach_inferior): Add overload that takes an
14168         inferior object.
14169         * inferior.h (detach_inferior): Likewise.
14170         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14171         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14172         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14173
14174 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14175
14176         * target.h (struct target_ops) <to_detach>: Add inferior
14177         parameter.
14178         (target_detach): Likewise.
14179         * target.c (dispose_inferior): Pass inferior down.
14180         (target_detach): Pass inferior down.  Assert that it is equal to
14181         the current inferior.
14182         * aix-thread.c (aix_thread_detach): Pass inferior down.
14183         * corefile.c (core_file_command): Pass current_inferior() down.
14184         * corelow.c (core_detach): Add inferior parameter.
14185         * darwin-nat.c (darwin_detach): Likewise.
14186         * gnu-nat.c (gnu_detach): Likewise.
14187         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14188         * infcmd.c (detach_command): Pass current_inferior() down to
14189         target_detach.
14190         * infrun.c (follow_fork_inferior): Pass parent_inf to
14191         target_detach.
14192         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14193         target_detach.
14194         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14195         * linux-thread-db.c (thread_db_detach): Likewise.
14196         * nto-procfs.c (procfs_detach): Likewise.
14197         * procfs.c (procfs_detach): Likewise.
14198         * record.c (record_detach): Likewise.
14199         * record.h (struct inferior): Forward-declare.
14200         (record_detach): Add inferior parameter.
14201         * remote-sim.c (gdbsim_detach): Likewise.
14202         * remote.c (remote_detach_1): Likewise.
14203         (remote_detach): Likewise.
14204         (extended_remote_detach): Likewise.
14205         * sol-thread.c (sol_thread_detach): Likewise.
14206         * target-debug.h (target_debug_print_inferior_p): New macro.
14207         * target-delegates.c: Re-generate.
14208         * top.c (kill_or_detach): Pass inferior down to target_detach.
14209         * windows-nat.c (windows_detach): Add inferior parameter.
14210
14211 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14212
14213         * target.h (struct target_ops) <to_detach>: Remove args
14214         parameter.
14215         (target_detach): Likewise.
14216         * target.c (dispose_inferior): Adjust.
14217         (target_detach): Remove args parameter, adjust.
14218         * aix-thread.c (aix_thread_detach): Adjust.
14219         * corefile.c (core_file_command): Adjust.
14220         * corelow.c (core_detach): Adjust.
14221         * darwin-nat.c (darwin_detach): Adjust.
14222         * gnu-nat.c (gnu_detach): Adjust.
14223         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14224         * infcmd.c (detach_command): Adjust
14225         * infrun.c (follow_fork_inferior): Adjust.
14226         (handle_vfork_child_exec_or_exit): Adjust.
14227         * linux-fork.c (linux_fork_detach): Remove args parameter.
14228         * linux-fork.h (linux_fork_detach): Likewise.
14229         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14230         * linux-thread-db.c (thread_db_detach): Likewise.
14231         * nto-procfs.c (procfs_detach): Likewise.
14232         * procfs.c (procfs_detach): Likewise.
14233         (do_detach): Remove signo parameter.
14234         * record.c (record_detach): Remove args parameter.
14235         * record.h (record_detach): Likewise.
14236         * remote-sim.c (gdbsim_detach): Likewise.
14237         * remote.c (remote_detach_1): Likewise.
14238         (remote_detach): Likewise.
14239         (extended_remote_detach): Likewise.
14240         * sol-thread.c (sol_thread_detach): Likewise.
14241         * target-delegates.c: Re-generate.
14242         * top.c (struct qt_args) <args>: Remove field.
14243         (kill_or_detach): Don't pass args.
14244         (quit_force): Don't set args.
14245         * windows-nat.c (windows_detach): Remove args parameter.
14246
14247 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14248
14249         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14250         (arm_linux_init_abi): Install it.
14251
14252 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14253
14254         * osabi.c (gdb_osabi_names): Extend the regexp for
14255         arm-linux-gnueabihf.
14256
14257 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14258
14259         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14260         m_abbrevs.
14261         (abbrev_table::add_abbrev): Update.
14262         (abbrev_table::lookup_abbrev): Update.
14263
14264 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14265
14266         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14267
14268 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14269
14270         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14271         to "std::string".
14272
14273 2018-01-17  Tom Tromey  <tom@tromey.com>
14274
14275         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14276
14277 2018-01-17  Tom Tromey  <tom@tromey.com>
14278
14279         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14280         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14281         (create_array_type_with_stride): Update.
14282         * dwarf2read.c (set_die_type): Update.
14283
14284 2018-01-17  Tom Tromey  <tom@tromey.com>
14285
14286         * dwarf2read.c (delayed_method_info): Remove typedef.
14287         (dwarf2_cu::method_info): Now a std::vector.
14288         (add_to_method_list): Update.
14289         (free_delayed_list): Remove.
14290         (compute_delayed_physnames): Update.
14291         (process_full_comp_unit, process_full_type_unit): Clear the method
14292         list.  Remove cleanups.
14293         (psymtab_include_file_name): Add name_holder parameter.  Use
14294         unique_xmalloc_ptr.
14295         (dwarf_decode_lines): 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): Add constructor, destructor.
14301         (dwarf2_per_objfile::free_cached_comp_units)
14302         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14303         (init_cutu_and_read_dies_no_follow): Update.
14304         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14305         (dwarf2_cu::~dwarf2_cu): New.
14306         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14307         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14308
14309 2018-01-17  Tom Tromey  <tom@tromey.com>
14310             Simon Marchi  <simon.marchi@ericsson.com>
14311
14312         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14313         (struct die_reader_specs) <abbrev_table>: New member.
14314         (struct abbrev_table): Add constructor.
14315         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14316         <abbrev_obstack>: Now an auto_obstack.
14317         (abbrev_table_up): New typedef.
14318         (init_cu_die_reader): Add abbrev_table parameter.
14319         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14320         Add result_dwo_abbrev_table.
14321         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14322         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14323         Update.
14324         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14325         parameter.
14326         (skip_children): Update.
14327         (abbrev_table::alloc_abbrev): Rename from
14328         abbrev_table_alloc_abbrev.
14329         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14330         (abbrev_table::lookup_abbrev): Rename from
14331         abbrev_table_lookup_abbrev.
14332         (abbrev_table_read_table): Return abbrev_table_up.
14333         (abbrev_table_free, abbrev_table_free_cleanup)
14334         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14335         (load_partial_dies): Update.
14336
14337 2018-01-17  Tom Tromey  <tom@tromey.com>
14338
14339         * dwarf2read.c (dwarf2_compute_name): Update comment.
14340         (read_func_scope, read_variable): Update.
14341         (new_symbol): Remove.
14342         (new_symbol_full): Rename to new_symbol.
14343
14344 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14345
14346         PR gdb/16577
14347         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14348         a warning instead of throwing an error, set section size to 0 and return
14349         NULL.
14350         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14351
14352 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14353
14354         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14355         std::string.
14356         (linux_ptrace_attach_fail_reason_string): Likewise.
14357         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14358         Likewise.
14359         (linux_ptrace_attach_fail_reason_string): Likewise.
14360         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14361
14362 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14363
14364         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14365
14366 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14367
14368         PR gdb/21559
14369         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14370         checking for fs_base/gs_base fields in struct user_regs_struct.
14371         * configure: Regenerate.
14372
14373 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14374
14375         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14376         function.
14377         (aarch64_linux_init_abi): Install it to gdbarch hook
14378         gcc_target_options.
14379
14380 2018-01-15  Pedro Alves  <palves@redhat.com>
14381
14382         * common/signals-state-save-restore.c
14383         (save_original_signals_state): Fix typos.
14384
14385 2017-01-12  Tom Tromey  <tom@tromey.com>
14386             Sergio Durigan Junior  <sergiodj@redhat.com>
14387
14388         * Makefile.in (install-only): Install gdb-add-index.
14389
14390 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14391
14392         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14393
14394 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14395
14396         * infrun.c (keep_going_pass_signal): Clear step-over info when
14397         insert_breakpoints fails.
14398
14399 2018-01-11  Pedro Alves  <palves@redhat.com>
14400
14401         PR gdb/22583
14402         * infrun.c (resume): Rename to ...
14403         (resume_1): ... this.
14404         (resume): Reimplement as wrapper around resume_1.
14405
14406 2018-01-11  Pedro Alves  <palves@redhat.com>
14407
14408         PR remote/22597
14409         * remote.c (remote_parse_stop_reply): Default to the last-set
14410         general thread instead of to 'magic_null_ptid'.
14411
14412 2018-01-10  Pedro Alves  <palves@redhat.com>
14413
14414         * language.h (language_get_symbol_name_matcher): Rename ...
14415         (get_symbol_name_matcher): ... this.
14416         * language.c (language_get_symbol_name_matcher): Ditto.
14417         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14418         callers adjusted.
14419
14420 2018-01-10  Pedro Alves  <palves@redhat.com>
14421
14422         PR gdb/22670
14423         * dwarf2read.c
14424         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14425         Adjust to use language_get_symbol_name_matcher instead of
14426         language_defn::la_get_symbol_name_matcher.
14427         * language.c (language_get_symbol_name_matcher): If in Ada mode
14428         and the lookup name is a verbatim match, return Ada's matcher.
14429         * language.h (language_get_symbol_name_matcher): Adjust comment.
14430         (ada_lookup_name_info::verbatim_p):: New method.
14431
14432 2018-01-10  Pedro Alves  <palves@redhat.com>
14433
14434         PR gdb/22670
14435         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14436         minsym's language is language_auto or language_cplus, pass down
14437         language_ada instead.
14438         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14439
14440 2018-01-10  Pedro Alves  <palves@redhat.com>
14441
14442         PR gdb/22670
14443         * minsyms.c (linkage_name_str): New function.
14444         (iterate_over_minimal_symbols): Use it.
14445
14446 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14447
14448         * NEWS: Document that 'info proc' now works on FreeBSD.
14449
14450 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14451
14452         * configure.ac: Check for kinfo_getfile in libutil.
14453         * configure: Regenerate.
14454         * config.in: Regenerate.
14455         * fbsd-nat.c: Include "fbsd-tdep.h".
14456         (fbsd_fetch_cmdline): New.
14457         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14458         rather than calling error.
14459         (fbsd_info_proc): New.
14460         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14461         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14462         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14463
14464 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14465
14466         * fbsd-nat.c (struct free_deleter): Remove.
14467         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14468
14469 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14470
14471         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14472         NULL for an empty pathname.
14473
14474 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14475
14476         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14477         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14478         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14479         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14480         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14481         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14482         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14483         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14484         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14485         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14486         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14487         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14488         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14489         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14490         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14491
14492 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14493
14494         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14495         (gnu_xfer_auxv): New function.
14496         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14497         TARGET_OBJECT_AUXV.
14498
14499 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14500             Simon Marchi  <simon.marchi@ericsson.com>
14501
14502         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14503         common/selftest.c.
14504         (COMMON_OBS): Remove selftest.o.
14505         * configure.ac: Append selftest-arch.c and common/selftest.c to
14506         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14507         * configure: Re-generated.
14508         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14509         GDB_SELF_TEST.
14510         (maintenance_info_selftests): Likewise.
14511
14512 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14513
14514         * ada-valprint.c (val_print_packed_array_elements): Use
14515         proper number of elements when printing an array indexed
14516         by an enumeration type.
14517
14518 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14519
14520         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14521         (dw2_get_file_names_reader): Adjust.
14522         (lookup_dwo_signatured_type): Adjust.
14523         (lookup_dwp_signatured_type): Adjust.
14524         (lookup_signatured_type): Adjust.
14525         (create_type_unit_group): Adjust.
14526         (get_type_unit_group): Adjust.
14527         (process_psymtab_comp_unit_reader): Adjust.
14528         (build_type_psymtabs_reader): Adjust.
14529         (scan_partial_symbols): Adjust.
14530         (add_partial_symbol): Adjust.
14531         (add_partial_subprogram): Adjust.
14532         (peek_die_abbrev): Adjust.
14533         (fixup_go_packaging): Adjust.
14534         (process_imported_unit_die): Adjust.
14535         (dwarf2_compute_name): Adjust.
14536         (dwarf2_physname): Adjust.
14537         (read_import_statement): Adjust.
14538         (handle_DW_AT_stmt_list): Adjust.
14539         (read_file_scope): Adjust.
14540         (read_func_scope): Adjust.
14541         (read_lexical_block_scope): Adjust.
14542         (read_call_site_scope): Adjust.
14543         (read_variable): Adjust.
14544         (dwarf2_rnglists_process): Adjust.
14545         (dwarf2_ranges_process): Adjust.
14546         (dwarf2_ranges_read): Adjust.
14547         (dwarf2_get_pc_bounds): Adjust.
14548         (dwarf2_record_block_ranges): Adjust.
14549         (dwarf2_add_field): Adjust.
14550         (dwarf2_add_member_fn): Adjust.
14551         (read_structure_type): Adjust.
14552         (process_structure_scope): Adjust.
14553         (read_enumeration_type): Adjust.
14554         (read_array_type): Adjust.
14555         (mark_common_block_symbol_computed): Adjust.
14556         (read_common_block): Adjust.
14557         (read_namespace_type): Adjust.
14558         (read_namespace): Adjust.
14559         (read_module_type): Adjust.
14560         (read_tag_pointer_type): Adjust.
14561         (read_tag_ptr_to_member_type): Adjust.
14562         (read_tag_string_type): Adjust.
14563         (read_subroutine_type): Adjust.
14564         (read_typedef): Adjust.
14565         (read_base_type): Adjust.
14566         (attr_to_dynamic_prop): Adjust.
14567         (read_subrange_type): Adjust.
14568         (read_unspecified_type): Adjust.
14569         (dwarf2_read_abbrevs): Adjust.
14570         (load_partial_dies): Adjust.
14571         (read_partial_die): Adjust.
14572         (find_partial_die): Adjust.
14573         (guess_partial_die_structure_name): Adjust.
14574         (fixup_partial_die): Adjust.
14575         (read_attribute_value): Adjust.
14576         (read_addr_index): Adjust.
14577         (read_addr_index_from_leb128): Adjust.
14578         (read_str_index): Adjust.
14579         (dwarf2_string_attr): Adjust.
14580         (get_debug_line_section): Adjust.
14581         (dwarf_decode_line_header): Adjust.
14582         (lnp_state_machine::check_line_address): Adjust.
14583         (dwarf_decode_lines_1): Adjust.
14584         (dwarf_decode_lines): Adjust.
14585         (dwarf2_start_symtab): Adjust.
14586         (var_decode_location): Adjust.
14587         (new_symbol_full): Adjust.
14588         (dwarf2_const_value_data): Adjust.
14589         (dwarf2_const_value_attr): Adjust.
14590         (dwarf2_const_value): Adjust.
14591         (die_type): Adjust.
14592         (die_containing_type): Adjust.
14593         (build_error_marker_type): Adjust.
14594         (lookup_die_type): Adjust.
14595         (guess_full_die_structure_name): Adjust.
14596         (anonymous_struct_prefix): Adjust.
14597         (determine_prefix): Adjust.
14598         (dwarf2_name): Adjust.
14599         (follow_die_ref_or_sig): Adjust.
14600         (follow_die_offset): Adjust.
14601         (follow_die_ref): Adjust.
14602         (follow_die_sig_1): Adjust.
14603         (follow_die_sig): Adjust.
14604         (get_signatured_type): Adjust.
14605         (get_DW_AT_signature_type): Adjust.
14606         (decode_locdesc): Adjust.
14607         (dwarf_decode_macros): Adjust.
14608         (cu_debug_loc_section): Adjust.
14609         (fill_in_loclist_baton): Adjust.
14610         (dwarf2_symbol_mark_computed): Adjust.
14611         (init_one_comp_unit): Don't assign
14612         dwarf2_cu::dwarf2_per_objfile.
14613         (set_die_type): Adjust.
14614
14615 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14616
14617         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14618         <dwarf2_per_objfile>: New field.
14619         (dwarf2_per_objfile): Remove global.
14620         (get_dwarf2_per_objfile): New function.
14621         (set_dwarf2_per_objfile): New function.
14622         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14623         dwarf2_per_objfile.
14624         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14625         (read_abbrev_offset): Likewise.
14626         (read_indirect_string): Likewise.
14627         (read_indirect_line_string): Likewise.
14628         (read_indirect_string_at_offset): Likewise.
14629         (read_indirect_string_from_dwz): Likewise.
14630         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14631         dwarf2_per_objfile.
14632         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14633         (create_all_comp_units): Change objfile parameter to
14634         dwarf2_per_objfile.
14635         (create_all_type_units): Likewise.
14636         (process_queue): Add dwarf2_per_objfile parameter.
14637         (read_and_check_comp_unit_head): Likewise.
14638         (lookup_dwo_unit_in_dwp): Likewise.
14639         (get_dwp_file): Likewise.
14640         (process_cu_includes): Likewise.
14641         (struct free_dwo_file_cleanup_data): New struct.
14642         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14643         set_dwarf2_per_objfile.
14644         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14645         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14646         context, adjust calls.
14647         (dw2_instantiate_symtab): Likewise.
14648         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14649         (dw2_get_cu): Likewise.
14650         (create_cu_from_index_list): Change objfile parameter to
14651         dwarf2_per_objfile.
14652         (create_cus_from_index_list): Get dwarf2_per_objfile from
14653         context, adjust calls.
14654         (create_cus_from_index): Likewise.
14655         (create_signatured_type_table_from_index): Change objfile
14656         parameter to dwarf2_per_objfile.
14657         (create_signatured_type_table_from_debug_names): Change objfile
14658         parameter to dwarf2_per_objfile.
14659         (create_addrmap_from_index): Likewise.
14660         (create_addrmap_from_aranges): Likewise.
14661         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14662         (dw2_setup): Remove.
14663         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14664         context.
14665         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14666         get_dwarf2_per_objfile.
14667         (dw2_forget_cached_source_info): Likewise.
14668         (dw2_map_symtabs_matching_filename): Likewise.
14669         (struct dw2_symtab_iterator) <index>: Remove.
14670         <dwarf2_per_objfile>: New field.
14671         (dw2_symtab_iter_init): Replace index parameter with
14672         dwarf2_per_objfile.
14673         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14674         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14675         (dw2_print_stats): Likewise.
14676         (dw2_dump): Likewise.
14677         (dw2_expand_symtabs_for_function): Likewise.
14678         (dw2_expand_all_symtabs): Likewise.
14679         (dw2_expand_symtabs_with_fullname): Likewise.
14680         (dw2_expand_marked_cus): Replace index and objfile parameters
14681         with dwarf2_per_objfile.
14682         (dw_expand_symtabs_matching_file_matcher): Add
14683         dwarf2_per_objfile parameter and adjust calls.
14684         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14685         adjust calls.
14686         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14687         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14688         adjust calls.
14689         (create_cus_from_debug_names_list): Replace objfile parameter
14690         with dwarf2_per_objfile and adjust calls.
14691         (create_cus_from_debug_names): Likewise.
14692         (dwarf2_read_debug_names): Likewise.
14693         (mapped_debug_names::namei_to_name): Adjust call.
14694         (dw2_debug_names_iterator::next): Likewise.
14695         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14696         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14697         (dw2_debug_names_dump): Likewise.
14698         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14699         (dw2_debug_names_expand_symtabs_matching): Likewise.
14700         (dwarf2_initialize_objfile): Likewise.
14701         (dwarf2_build_psymtabs): Likewise.
14702         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14703         this_cu.
14704         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14705         (read_and_check_comp_unit_head): Likewise.
14706         (read_abbrev_offset): Likewise.
14707         (create_debug_type_hash_table): Likewise.
14708         (create_debug_types_hash_table): Likewise.
14709         (create_all_type_units): Replace objfile parameter with
14710         dwarf2_per_objfile.
14711         (add_type_unit): Add dwarf2_per_objfile parameter.
14712         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14713         with dwarf2_per_objfile.
14714         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14715         (lookup_dwp_signatured_type): Likewise.
14716         (lookup_signatured_type): Likewise.
14717         (read_cutu_die_from_dwo): Likewise.
14718         (init_tu_and_read_dwo_dies): Likewise.
14719         (init_cutu_and_read_dies): Likewise.
14720         (init_cutu_and_read_dies_no_follow): Likewise.
14721         (allocate_type_unit_groups_table): Add objfile parameter.
14722         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14723         (get_type_unit_group): Likewise.
14724         (process_psymtab_comp_unit): Update call.
14725         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14726         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14727         (print_tu_stats): Likewise.
14728         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14729         in void* parameter.
14730         (build_type_psymtabs): Change objfile parameter to
14731         dwarf2_per_objfile.
14732         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14733         passed in void* parameter.
14734         (process_skeletonless_type_units): Change objfile parameter to
14735         dwarf2_per_objfile.
14736         (set_partial_user): Likewise.
14737         (dwarf2_build_psymtabs_hard): Likewise.
14738         (read_comp_units_from_section): Likewise.
14739         (create_all_comp_units): Likewise.
14740         (scan_partial_symbols): Update calls.
14741         (add_partial_symbol): Likewise.
14742         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14743         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14744         (process_queue): Add dwarf2_per_objfile parameter.
14745         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14746         (compute_compunit_symtab_includes): Likewise.
14747         (process_cu_includes): Add dwarf2_per_objfile parameter.
14748         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14749         (process_full_type_unit): Likewise.
14750         (process_imported_unit_die): Update call.
14751         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14752         (read_file_scope): Likewise.
14753         (allocate_dwo_file_hash_table): Add objfile parameter.
14754         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14755         (create_cus_hash_table): Likewise.
14756         (create_dwp_hash_table): Likewise.
14757         (create_dwo_unit_in_dwp_v1): Likewise.
14758         (create_dwp_v2_section): Likewise.
14759         (create_dwo_unit_in_dwp_v2): Likewise.
14760         (lookup_dwo_unit_in_dwp): Likewise.
14761         (try_open_dwop_file): Likewise.
14762         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14763         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14764         cleanup to include a reference to dwarf2_per_objfile.
14765         (open_dwp_file): Add dwarf2_per_objfile parameter.
14766         (open_and_init_dwp_file): Likewise.
14767         (get_dwp_file): Likewise.
14768         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14769         (queue_and_load_all_dwo_tus): Update call.
14770         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14771         data.
14772         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14773         (dwarf2_ranges_process): Likewise.
14774         (dwarf2_get_pc_bounds): Likewise.
14775         (mark_common_block_symbol_computed): Likewise.
14776         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14777         (dwarf2_read_abbrevs): Update call.
14778         (read_partial_die): Use dwarf2_per_objfile from cu.
14779         (find_partial_die): Likewise.
14780         (fixup_partial_die): Likewise.
14781         (read_attribute_value): Likewise.
14782         (read_indirect_string_at_offset_from): Add objfile parameter.
14783         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14784         parameter.
14785         (read_indirect_string_from_dwz): Add objfile parameter.
14786         (read_indirect_string): Add objfile parameter.
14787         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14788         (read_addr_index): Use dwarf2_per_objfile from cu.
14789         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14790         call dw2_setup.
14791         (read_str_index): Use dwarf2_per_objfile from cu.
14792         (get_debug_line_section): Likewise.
14793         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14794         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14795         (new_symbol_full): Use dwarf2_per_objfile from cu.
14796         (build_error_marker_type): Likewise.
14797         (lookup_die_type): Likewise.
14798         (determine_prefix): Likewise.
14799         (follow_die_offset): Likewise.
14800         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14801         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14802         (dwarf2_fetch_die_type_sect_off): Likewise.
14803         (dwarf2_get_die_type): Likewise.
14804         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14805         (get_signatured_type): Likewise.
14806         (get_DW_AT_signature_type): Likewise.
14807         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14808         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14809         (cu_debug_loc_section): Likewise.
14810         (fill_in_loclist_baton): Likewise.
14811         (dwarf2_symbol_mark_computed): Likewise.
14812         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14813         dwarf2_per_objfile.
14814         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14815         parameter.
14816         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14817         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14818         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14819         (set_die_type): Use dwarf2_free_objfile from cu.
14820         (get_die_type_at_offset): Likewise.
14821         (dwarf2_per_objfile_free): Don't assign global variable.
14822         (debug_names) <constructor>: Add dwarf2_per_objfile
14823         parameter, update m_debugstrlookup construction.
14824         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14825         parameter.
14826         <m_dwarf2_per_objfile>: New field.
14827         <lookup>: Use m_dwarf2_per_objfile.
14828         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14829         (psyms_seen_size): Likewise.
14830         (write_gdbindex): Replace objfile parameter with
14831         dwarf2_per_objfile.
14832         (write_debug_names): Likewise.
14833         (write_psymtabs_to_index): Likewise.
14834         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14835         calls.
14836
14837 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14838
14839         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14840         <dwarf2_per_objfile>: New field.
14841         (struct dwarf2_per_cu_data) <objfile>: Remove.
14842         <dwarf2_per_objfile>: New field.
14843         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14844         of objfile.
14845         (create_signatured_type_table_from_index): Likewise.
14846         (create_debug_type_hash_table): Likewise.
14847         (fill_in_sig_entry_from_dwo_entry): Likewise.
14848         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14849         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14850         objfile.
14851         (create_partial_symtab): Access objfile through
14852         dwarf2_per_objfile.
14853         (process_psymtab_comp_unit_reader): Likewise.
14854         (read_comp_units_from_section): Likewise.
14855         (scan_partial_symbols): Likewise.
14856         (add_partial_symbol): Likewise.
14857         (add_partial_subprogram): Likewise.
14858         (peek_die_abbrev): Likewise.
14859         (fixup_go_packaging): Likewise.
14860         (process_full_comp_unit): Likewise.
14861         (process_full_type_unit): Likewise.
14862         (process_imported_unit_die): Likewise.
14863         (dwarf2_compute_name): Likewise.
14864         (dwarf2_physname): Likewise.
14865         (read_import_statement): Likewise.
14866         (create_cus_hash_table): Assign dwarf2_physname instead of
14867         objfile.
14868         (read_func_scope): Access objfile through dwarf2_per_objfile.
14869         (read_lexical_block_scope): Likewise.
14870         (read_call_site_scope): Likewise.
14871         (read_variable): Likewise.
14872         (dwarf2_rnglists_process): Likewise.
14873         (dwarf2_ranges_process): Likewise.
14874         (dwarf2_ranges_read): Likewise.
14875         (dwarf2_record_block_ranges): Likewise.
14876         (dwarf2_add_field): Likewise.
14877         (dwarf2_add_member_fn): Likewise.
14878         (read_structure_type): Likewise.
14879         (process_structure_scope): Likewise.
14880         (read_enumeration_type): Likewise.
14881         (read_array_type): Likewise.
14882         (read_common_block): Likewise.
14883         (read_namespace_type): Likewise.
14884         (read_namespace): Likewise.
14885         (read_module_type): Likewise.
14886         (read_tag_pointer_type): Likewise.
14887         (read_tag_ptr_to_member_type): Likewise.
14888         (read_tag_string_type): Likewise.
14889         (read_subroutine_type): Likewise.
14890         (read_typedef): Likewise.
14891         (read_base_type): Likewise.
14892         (attr_to_dynamic_prop): Likewise.
14893         (read_subrange_type): Likewise.
14894         (read_unspecified_type): Likewise.
14895         (load_partial_dies): Likewise.
14896         (read_partial_die): Likewise.
14897         (find_partial_die): Likewise.
14898         (guess_partial_die_structure_name): Likewise.
14899         (fixup_partial_die): Likewise.
14900         (read_attribute_value): Likewise.
14901         (read_addr_index_from_leb128): Likewise.
14902         (dwarf2_read_addr_index): Likewise.
14903         (dwarf2_string_attr): Likewise.
14904         (lnp_state_machine::check_line_address): Likewise.
14905         (dwarf_decode_lines_1): Likewise.
14906         (dwarf_decode_lines): Likewise.
14907         (dwarf2_start_symtab): Likewise.
14908         (var_decode_location): Likewise.
14909         (new_symbol_full): Likewise.
14910         (dwarf2_const_value_data): Likewise.
14911         (dwarf2_const_value_attr): Likewise.
14912         (dwarf2_const_value): Likewise.
14913         (die_type): Likewise.
14914         (die_containing_type): Likewise.
14915         (lookup_die_type): Likewise.
14916         (guess_full_die_structure_name): Likewise.
14917         (anonymous_struct_prefix): Likewise.
14918         (dwarf2_name): Likewise.
14919         (follow_die_ref_or_sig): Likewise.
14920         (follow_die_offset): Likewise.
14921         (follow_die_ref): Likewise.
14922         (dwarf2_fetch_die_loc_sect_off): Likewise.
14923         (dwarf2_fetch_constant_bytes): Likewise.
14924         (dwarf2_fetch_die_type_sect_off): Likewise.
14925         (dwarf2_get_die_type): Likewise.
14926         (follow_die_sig): Likewise.
14927         (decode_locdesc): Likewise.
14928         (dwarf2_per_cu_objfile): Likewise.
14929         (dwarf2_per_cu_text_offset): Likewise.
14930         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14931         objfile.
14932         (set_die_type): Access objfile through
14933         dwarf2_per_objfile.
14934
14935 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14936
14937         * valprint.c (converted_character_d): Remove typedef.
14938         (DEF_VEC_O (converted_character_d)): Remove.
14939         (count_next_character): Use std::vector.
14940         (print_converted_chars_to_obstack): Likewise.
14941         (generic_printstr): Likewise.
14942
14943 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14944
14945         * xml-support.h (struct gdb_xml_value): Add constructor.
14946         <value>: Change type to unique_xmalloc_ptr.
14947         (gdb_xml_value_s): Remove typedef.
14948         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14949         (gdb_xml_element_start_handler): Change parameter type to
14950         std::vector.
14951         (xml_find_attribute): Likewise.
14952         * xml-support.c (xml_find_attribute): Change parameter type to
14953         std::vector and adjust.
14954         (gdb_xml_values_cleanup): Remove.
14955         (gdb_xml_parser::start_element): Adjust to std::vector.
14956         (xinclude_start_include): Change paraeter type to std::vector
14957         and adjust.
14958         * btrace.c (check_xml_btrace_version): Likewise.
14959         (parse_xml_btrace_block): Likewise.
14960         (parse_xml_btrace_pt_config_cpu): Likewise.
14961         (parse_xml_btrace_pt): Likewise.
14962         (parse_xml_btrace_conf_bts): Likewise.
14963         (parse_xml_btrace_conf_pt): Likewise.
14964         * memory-map.c (memory_map_start_memory): Likewise.
14965         (memory_map_start_property): Likewise.
14966         * osdata.c (osdata_start_osdata): Likewise.
14967         (osdata_start_item): Likewise.
14968         (osdata_start_column): Likewise.
14969         * remote.c (start_thread): Likewise.
14970         * solib-aix.c (library_list_start_library): Likewise.
14971         (library_list_start_list): Likewise.
14972         * solib-svr4.c (library_list_start_library): Likewise.
14973         (svr4_library_list_start_list): Likewise.
14974         * solib-target.c (library_list_start_segment): Likewise.
14975         (library_list_start_section): Likewise.
14976         (library_list_start_library): Likewise.
14977         (library_list_start_list): Likewise.
14978         * tracepoint.c (traceframe_info_start_memory): Likewise.
14979         (traceframe_info_start_tvar): Likewise.
14980         * xml-syscall.c (syscall_start_syscall): Likewise.
14981         * xml-tdesc.c (tdesc_start_target): Likewise.
14982         (tdesc_start_feature): Likewise.
14983         (tdesc_start_reg): Likewise.
14984         (tdesc_start_union): Likewise.
14985         (tdesc_start_struct): Likewise.
14986         (tdesc_start_flags): Likewise.
14987         (tdesc_start_enum): Likewise.
14988         (tdesc_start_field): Likewise.
14989         (tdesc_start_enum_value): Likewise.
14990         (tdesc_start_vector): Likewise.
14991
14992 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14993
14994         * extension.h (struct xmethod_worker) <clone>: Remove.
14995         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14996         Remove.
14997         (python_xmethod_worker::clone): Remove.
14998         * valops.c (find_overload_match): Use std::move instead of
14999         clone.
15000
15001 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15002
15003         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15004         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15005         <free_xmethod_worker_data>: Remove.
15006         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15007         <get_xmethod_arg_types>: Remove.
15008         <get_xmethod_result_type>: Remove.
15009         <invoke_xmethod>: Remove.
15010         * extension.c (new_xmethod_worker): Remove.
15011         (clone_xmethod_worker): Remove.
15012         (get_matching_xmethod_workers): Return void, pass std::vector by
15013         pointer.
15014         (get_xmethod_arg_types): Rename to...
15015         (xmethod_worker::get_arg_types): ... this, and adjust.
15016         (get_xmethod_result_type): Rename to...
15017         (xmethod_worker::get_result_type): ... this, and adjust.
15018         (invoke_xmethod): Remove.
15019         (free_xmethod_worker): Remove.
15020         (free_xmethod_worker_vec): Remove.
15021         * extension.h (enum ext_lang_rc): Move here from
15022         extension-priv.h.
15023         (struct xmethod_worker): Add constructor and destructor.
15024         <data>: Remove.
15025         <value>: Remove.
15026         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15027         virtual pure methods.
15028         <get_arg_types, get_result_type>: New methods.
15029         (xmethod_worker_ptr): Remove typedef.
15030         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15031         (xmethod_worker_vec): Remove typedef.
15032         (xmethod_worker_up): New typedef.
15033         (invoke_xmethod): Remove.
15034         (clone_xmethod_worker): Remove.
15035         (free_xmethod_worker): Remove.
15036         (free_xmethod_worker_vec): Remove.
15037         (get_xmethod_arg_types): Remove.
15038         (get_xmethod_result_type): Remove.
15039         * valops.c (find_method_list): Use std::vector, don't use
15040         intermediate vector.
15041         (value_find_oload_method_list): Use std::vector.
15042         (find_overload_match): Use std::vector.
15043         (find_oload_champ): Use std::vector.
15044         * value.c (value_free): Use operator delete.
15045         (value_of_xmethod): Rename to...
15046         (value_from_xmethod): ... this.  Don't assign
15047         xmethod_worker::value, take rvalue-reference.
15048         (result_type_of_xmethod): Adjust.
15049         (call_xmethod): Adjust.
15050         * value.h: Include extension.h.
15051         (struct xmethod_worker): Don't forward-declare.
15052         (value_of_xmethod): Rename to...
15053         (value_from_xmethod): ... this, take rvalue-reference.
15054         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15055         (struct python_xmethod_worker): ... this, add constructor and
15056         destructor.
15057         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15058         (gdbpy_free_xmethod_worker_data): Rename to...
15059         (python_xmethod_worker::~python_xmethod_worker): ... this and
15060         adjust.
15061         (gdbpy_clone_xmethod_worker_data): Rename to...
15062         (python_xmethod_worker::clone): ... this and adjust.
15063         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15064         temporary vector.
15065         (gdbpy_get_xmethod_arg_types): Rename to...
15066         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15067         (gdbpy_get_xmethod_result_type): Rename to...
15068         (python_xmethod_worker::do_get_result_type): ... this and
15069         adjust.
15070         (gdbpy_invoke_xmethod): Rename to...
15071         (python_xmethod_worker::invoke): ... this and adjust.
15072         (new_python_xmethod_worker): Rename to...
15073         (python_xmethod_worker::python_xmethod_worker): ... this and
15074         adjust.
15075         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15076         Remove.
15077         (gdbpy_free_xmethod_worker_data): Remove.
15078         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15079         (gdbpy_get_xmethod_arg_types): Remove.
15080         (gdbpy_get_xmethod_result_type): Remove.
15081         (gdbpy_invoke_xmethod): Remove.
15082         * python/python.c (python_extension_ops): Remove obsolete
15083         callbacks.
15084
15085 2018-01-05  Pedro Alves  <palves@redhat.com>
15086
15087         PR gdb/18653
15088         * common/signals-state-save-restore.c
15089         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15090         find a custom handler preinstalled, instead of internal erroring.
15091         But only warn if !quiet.
15092         * common/signals-state-save-restore.h
15093         (save_original_signals_state): New parameter 'quiet'.
15094         * main.c (captured_main_1): Move save_original_signals_state call
15095         after option handling, and pass QUIET.
15096
15097 2018-01-05  Pedro Alves  <palves@redhat.com>
15098
15099         * spu-tdep.c (spu_catch_start): Pass
15100         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15101
15102 2018-01-05  Pedro Alves  <palves@redhat.com>
15103
15104         PR gdb/22670
15105         * ada-lang.c (literal_symbol_name_matcher): New function.
15106         (ada_get_symbol_name_matcher): Use it for
15107         symbol_name_match_type::SEARCH_NAME.
15108         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15109         it down instead of assuming symbol_name_match_type::FULL.
15110         * block.h (block_lookup_symbol): New parameter 'match_type'.
15111         * c-valprint.c (print_unpacked_pointer): Use
15112         lookup_symbol_search_name instead of lookup_symbol.
15113         * compile/compile-object-load.c (get_out_value_type): Pass down
15114         symbol_name_match_type::SEARCH_NAME.
15115         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15116         symbol_name_match_type::FULL.
15117         * cp-support.c (cp_get_symbol_name_matcher): Handle
15118         symbol_name_match_type::SEARCH_NAME.
15119         * infrun.c (insert_exception_resume_breakpoint): Use
15120         lookup_symbol_search_name.
15121         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15122         * psymtab.c (maintenance_check_psymtabs): Use
15123         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15124         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15125         SYMBOL_SEARCH_NAME.
15126         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15127         if symbol_name_match_type::SEARCH_NAME.
15128         (lookup_symbol_in_language): Pass down
15129         symbol_name_match_type::FULL.
15130         (lookup_symbol_search_name): New.
15131         (lookup_language_this): Pass down
15132         symbol_name_match_type::SEARCH_NAME.
15133         (lookup_symbol_aux, lookup_local_symbol): New parameter
15134         'match_type'.  Pass it down.
15135         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15136         (lookup_symbol_search_name): New declaration.
15137         (lookup_symbol_in_block): New 'match_type' parameter.
15138
15139 2018-01-05  Pedro Alves  <palves@redhat.com>
15140
15141         PR gdb/22670
15142         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15143         ada_lookup_symbol.
15144         (ada_lookup_symbol): Reimplement in terms of
15145         ada_lookup_symbol_list, bits factored out from
15146         ada_lookup_encoded_symbol.
15147
15148 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15149
15150         * ada-exp.y (write_object_renaming): When subscripting an array
15151         using a symbol as the index, pass the block in call to
15152         ada_lookup_encoded_symbol when looking that symbol up.
15153
15154 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15155
15156         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15157         TYPE_INDEX_TYPE.
15158
15159 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15160
15161         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15162         the case where VALUE_LVAL (val0) is not lval_memory.
15163
15164 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15165
15166         * ada-valprint.c (print_optional_low_bound): Handle
15167         character-indexed array printing like boolean-indexed array
15168         printing.
15169
15170 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15171
15172         * NEWS: Create a new section for the next release branch.
15173         Rename the section of the current branch, now that it has
15174         been cut.
15175
15176 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15177
15178         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15179         * version.in: Bump version to 8.1.50.DATE-git.
15180
15181 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15182
15183         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15184         Add field.
15185         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15186         Add field.
15187         (default_exception_support_info) <catch_handlers_sym>: Add field.
15188         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15189         (ada_exception_name_addr_1): Add "catch handlers" handling.
15190         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15191         Update all callers.
15192         (create_excep_cond_exprs) <ex>: Add parameter.
15193         (re_set_exception): Update create_excep_cond_exprs call.
15194         (print_it_exception, print_one_exception, print_mention_exception)
15195         (print_recreate_exception): Add "catch handler" handling.
15196         (allocate_location_catch_handlers, re_set_catch_handlers)
15197         (check_status_catch_handlers, print_it_catch_handlers)
15198         (print_one_catch_handlers, print_mention_catch_handlers)
15199         (print_recreate_catch_handlers): New function.
15200         (catch_handlers_breakpoint_ops): New variable.
15201         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15202         Add parameter.  Add "catch handler" handling.
15203         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15204         Add "catch handler" handling.
15205         (ada_exception_catchpoint_cond_string): Add "catch handler"
15206         handling.
15207         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15208         call.
15209         (catch_ada_handlers_command): New function.
15210         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15211         operations structure.
15212         (_initialize_ada_language): Add "catch handlers" command entry.
15213         * NEWS: Document "catch handlers" feature.
15214
15215 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15216
15217         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15218         account when creating the array type of the slice.
15219         (ada_value_slice): Likewise.
15220
15221 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15222
15223         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15224         New enum value.
15225         (create_array_type_with_stride): Add byte_stride_prop parameter.
15226         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15227         New parameter.  Update all callers in this file.
15228         (array_type_has_dynamic_stride): New function.
15229         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15230         of arrays with dynamic byte strides.
15231         * dwarf2read.c (read_array_type): Add support for dynamic
15232         DW_AT_byte_stride attributes.
15233
15234 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15235
15236         * dwarf2read.c (read_unspecified_type): Treat
15237         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15238
15239 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15240
15241         Update copyright year range in all GDB files.
15242
15243 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15244
15245         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15246         and gdb/testsuite/gdb.base/step-line.c.
15247
15248 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15249
15250         * copyright.py (main): Dump the contents of
15251         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15252         even if BY_HAND is empty.
15253
15254 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15255
15256         * top.c (print_gdb_version): Update Copyright year in version
15257         message.
15258
15259 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15260
15261         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15262
15263 For older changes see ChangeLog-2017.
15264 \f
15265 Local Variables:
15266 mode: change-log
15267 left-margin: 8
15268 fill-column: 74
15269 version-control: never
15270 coding: utf-8
15271 End: