RISC-V: Linux signal frame support.
[external/binutils.git] / gdb / ChangeLog
1 2018-10-26  Jim Wilson  <jimw@sifive.com>
2
3         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
4         (riscv_isa_flen): Likewise.  Drop static.
5         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
6         (riscv_isa_flen): Likewise.  Declare.
7
8 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
9             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
10
11         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
12         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
13         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
14         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
15         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
16         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
17         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
18         Define.
19         (struct ppc_linux_features) <htm>: New field.
20         (ppc_linux_no_features): Add initializer for htm field.
21         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
22         new tdescs.
23         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
24         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
25         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
26         Define if not already defined.
27         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
28         and rs6000/powerpc-isa207-htm-vsx64l.
29         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
30         rs6000/powerpc-isa207-htm-vsx64l.xml.
31         * features/rs6000/power-htm-spr.xml: New file.
32         * features/rs6000/power-htm-core.xml: New file.
33         * features/rs6000/power64-htm-core.xml: New file.
34         * features/rs6000/power-htm-fpu.xml: New file.
35         * features/rs6000/power-htm-altivec.xml: New file.
36         * features/rs6000/power-htm-vsx.xml: New file.
37         * features/rs6000/power-htm-ppr.xml: New file.
38         * features/rs6000/power-htm-dscr.xml: New file.
39         * features/rs6000/power-htm-tar.xml: New file.
40         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
41         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
42         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
43         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
44         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
45         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
46         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
47         fetch_regset with HTM regsets.
48         (store_register, store_ppc_registers): Call store_regset with HTM
49         regsets.
50         (ppc_linux_nat_target::read_description): Set htm field in the
51         features struct if needed.
52         * ppc-linux-tdep.c: Include
53         features/rs6000/powerpc-isa207-htm-vsx32l.c and
54         features/rs6000/powerpc-isa207-htm-vsx64l.c.
55         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
56         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
57         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
58         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
59         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
60         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
61         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
62         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
63         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
64         (ppc32_linux_ctarregset): New globals.
65         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
66         (ppc_linux_collect_core_cpgrregset): New function.
67         (ppc_linux_iterate_over_regset_sections): Call back with the htm
68         regsets.
69         (ppc_linux_core_read_description): Check if the tm spr section is
70         present and set htm in the features struct.
71         (_initialize_ppc_linux_tdep): Call
72         initialize_tdesc_powerpc_isa207_htm_vsx32l and
73         initialize_tdesc_powerpc_isa207_htm_vsx64l.
74         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
75         Declare.
76         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
77         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
78         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
79         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
80         New fields.
81         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
82         Likewise.
83         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
84         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
85         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
86         New enum fields.
87         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
88         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
89         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
90         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
91         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
92         <PPC_CTAR_REGNUM>: Likewise.
93         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
94         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
95         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
96         (IS_CEFP_PSEUDOREG): Define.
97         (rs6000_register_name): Hide the upper halves of checkpointed VSX
98         registers.  Return names for the checkpointed DFP, VSX, and EFP
99         pseudo registers.
100         (rs6000_pseudo_register_type): Remove initial assert and raise an
101         internal error in the else clause instead.  Return types for the
102         checkpointed DFP, VSX, and EFP pseudo registers.
103         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
104         checkpointed DFP pseudo registers.
105         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
106         checkpointed VSX pseudo registers.
107         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
108         from efpr_pseudo_register_read and
109         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
110         registers.
111         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
112         Handle checkpointed DFP, VSX, and EFP registers.
113         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
114         (efp_ax_pseudo_register_collect): New functions.
115         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
116         register logic to new functions.  Handle checkpointed DFP, VSX,
117         and EFP pseudo registers.
118         (rs6000_gdbarch_init): Look for and validate the htm features.
119         Include checkpointed DFP, VSX and EFP pseudo-registers.
120         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
121         HTM registers.
122
123 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
124
125         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
126         without altivec or fpu.
127
128 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
129             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
130
131         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
132         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
133         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
134         Define if not already defined.
135         * features/rs6000/power-ebb.xml: New file.
136         * features/rs6000/power-linux-pmu.xml: New file.
137         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
138         features.
139         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
140         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
141         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
142         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
143         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
144         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
145         fetch_regset with ebb and pmu regsets.
146         (store_register, store_ppc_registers): Call store_regset with ebb
147         and pmu regsets.
148         (ppc_linux_nat_target::read_description): Set isa207 field in the
149         features struct if ebb and pmu are avaiable.
150         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
151         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
152         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
153         and pmu regsets.
154         (ppc_linux_core_read_description): Check if the pmu section is
155         present and set isa207 in the features struct.
156         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
157         (ppc32_linux_pmuregset): Declare.
158         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
159         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
160         <ppc_sier_regnum>: New field.
161         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
162         New enum values.
163         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
164         values.
165         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
166         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
167         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
168         ebb and pmu features.
169
170 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
171             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
172
173         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
174         (tdesc_powerpc_isa207_vsx64l): Declare.
175         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
176         (struct ppc_linux_features) <isa207>: New field.
177         (ppc_linux_no_features): Add initializer for isa207 field.
178         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
179         new tdescs.
180         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
181         (NT_PPC_TAR): Define if not already defined.
182         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
183         rs6000/powerpc-isa207-vsx64l.
184         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
185         rs6000/powerpc-isa207-vsx64l.xml.
186         * features/rs6000/power-tar.xml: New file.
187         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
188         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
189         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
190         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
191         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
192         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
193         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
194         fetch_regset with the TAR regset.
195         (store_register, store_ppc_registers): Call store_regset with the
196         TAR regset.
197         (ppc_linux_nat_target::read_description): Set isa207 field in the
198         features struct if needed.
199         * ppc-linux-tdep.c: Include
200         features/rs6000/powerpc-isa207-vsx32l.c and
201         features/rs6000/powerpc-isa207-vsx64l.c.
202         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
203         (ppc_linux_iterate_over_regset_sections): Call back with the tar
204         regset.
205         (ppc_linux_core_read_description): Check if the tar section is
206         present and set isa207 in the features struct.
207         (_initialize_ppc_linux_tdep): Call
208         initialize_tdesc_powerpc_isa207_vsx32l and
209         initialize_tdesc_powerpc_isa207_vsx64l.
210         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
211         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
212         (enum) <PPC_TAR_REGNUM>: New enum value.
213         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
214         feature.
215         (ppc_process_record_op31): Record changes to TAR.
216
217 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
218             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
219
220         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
221         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
222         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
223         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
224         (struct ppc_linux_features) <ppr_dscr>: New field.
225         (ppc_linux_no_features): Add initializer for ppr_dscr field.
226         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
227         new tdescs.
228         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
229         Define if not already defined.
230         * features/Makefile (WHICH): Add
231         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
232         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
233         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
234         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
235         * features/rs6000/power-dscr.xml: New file.
236         * features/rs6000/power-ppr.xml: New file.
237         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
238         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
239         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
240         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
241         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
242         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
243         * ppc-linux-nat.c: Include <sys/uio.h>.
244         (fetch_regset, store_regset, check_regset): New functions.
245         (fetch_register, fetch_ppc_registers): Call fetch_regset with
246         DSCR and PPR regsets.
247         (store_register, store_ppc_registers): Call store_regset with
248         DSCR and PPR regsets.
249         (ppc_linux_get_hwcap2): New function.
250         (ppc_linux_nat_target::read_description): Call
251         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
252         features struct if needed.
253         * ppc-linux-tdep.c: Include
254         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
255         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
256         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
257         (ppc32_linux_dscrregset): New globals.
258         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
259         and dscr regsets.
260         (ppc_linux_core_read_description): Check if the ppr and dscr
261         sections are present and set ppr_dscr in the features struct.
262         (_initialize_ppc_linux_tdep): Call
263         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
264         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
265         * ppc-linux-tdep.h (ppc32_linux_pprregset)
266         (ppc32_linux_dscrregset): Declare.
267         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
268         <ppc_dscr_regnum>: New field.
269         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
270         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
271         and dscr features.
272         (ppc_process_record_op31): Record changes to PPR and DSCR.
273
274 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
275
276         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
277         second initializer line for the have_* variables.  Initialize
278         have_fpu to 0 instead of 1.
279
280 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
281
282         * arch/ppc-linux-common.c (ppc_linux_match_description):
283         Parenthesize tdesc assignements and indent them properly.
284
285 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
286
287         * ppc-linux-nat.c (fetch_register): Change if statement to else
288         if.
289         (store_register): Likewise.
290
291 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
292
293         * rs6000-tdep.c: Remove reggroups.h include.
294         (rs6000_pseudo_register_reggroup_p): Remove.
295         (rs6000_gdbarch_init): Remove call to
296         set_tdesc_pseudo_register_reggroup_p.
297
298 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
299
300         * reggroups.c (default_register_reggroup_p): Return true for
301         decfloat registers and float_reggroup.
302
303 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
304
305         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
306         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
307         ppc_linux_collect_vrregset by regcache_collect_regset.
308
309 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
310
311         * linux-tdep.c (linux_collect_regset_section_cb): Use
312         std::vector<gdb_byte> instead of char * and malloc for buf.
313         Remove xfree.
314
315 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
316
317         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
318         symtab_start instead of always using language_unknown.
319
320 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
321
322         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
323         READ_P parameter, catch and ignore register access errors from
324         either the old or new MISA location.
325         (riscv_has_feature): Update call to riscv_read_misa_reg.
326
327 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
328
329         * python/py-function.c (convert_values_to_python): Return
330         gdbpy_ref<>.  Add header comment.
331         (fnpy_call): Adjust.
332
333 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
334
335         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
336         (cmdpy_completer_handle_brkchars): Adjust.
337         (cmdpy_completer): Adjust.
338
339 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
340
341         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
342         Pass correct regnum to raw_supply_zeroed.
343
344 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
345
346         * regcache.c (cooked_read_test): Add CSKY to the list of
347         architectures with a save_reggroup
348
349 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
350
351         PR gdb/23368
352         * infrun.c (follow_exec): In the follow_exec_mode_new case,
353         transfer terminal state from old new new inferior.
354         * terminal.h (swap_terminal_info): New function.
355         * inflow.c (swap_terminal_info): New function.
356
357 2018-10-23  Tom Tromey  <tom@tromey.com>
358
359         * record-btrace.c (get_thread_current_frame_id): Rename from
360         get_thread_current_frame.  Return a frame_id.
361         (record_btrace_start_replaying): Update.
362
363 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
364
365         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
366         for CSRs.
367
368 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
369
370         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
371         have_nonsteppable_watchpoint attribute to 1.
372
373 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
374
375         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
376         register names.
377         (struct register_alias): Rename to...
378         (struct riscv_register_alias): ...this, and update comment.
379         (riscv_register_aliases): Update type, and alias names.  Remove
380         CSR names from this list.
381         (riscv_register_name): Use riscv_gdb_reg_names for int and float
382         register names.  Add an extra assertion.
383         (riscv_is_regnum_a_named_csr): New function.
384         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
385
386 2018-10-22  Jim Wilson  <jimw@sifive.com>
387
388         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
389         FP reg smaller than FP reg size, and fill with -1 instead of 0.
390
391         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
392         (riscv_register_type): Use them.
393         (riscv_print_one_register_info): Handle union of floats same as float.
394         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
395         riscv_fpreg_q_type fields.
396
397 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
398
399         * gdbarch.sh (gdbarch_num_cooked_regs): New.
400         * gdbarch.h: Re-generate.
401         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
402         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
403         * eval.c (evaluate_subexp_standard): Likewise.
404         * findvar.c (value_of_register): Likewise.
405         (value_of_register_lazy): Likewise.
406         (address_from_register): Likewise.
407         * frame.c (get_frame_register_bytes): Likewise.
408         * gdbarch-selftests.c (register_to_value_test): Likewise.
409         * h8300-tdep.c (h8300_register_type): Likewise.
410         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
411         (i386_svr4_reg_to_regnum): Likewise.
412         * infcmd.c (default_print_registers_info): Likewise.
413         (registers_info): Likewise.
414         (print_vector_info): Likewise.
415         (default_print_float_info): Likewise.
416         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
417         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
418         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
419         (mi_cmd_data_list_changed_registers): Likewise.
420         (mi_cmd_data_list_register_values): Likewise.
421         (mi_cmd_data_write_register_values): Likewise.
422         (mi_cmd_trace_frame_collected): Likewise.
423         * mips-tdep.c (print_gp_register_row): Likewise.
424         (mips_print_registers_info): Likewise.
425         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
426         * regcache.c (init_regcache_descr): Likewise.
427         (register_size): Likewise.
428         (register_dump::dump): Likewise.
429         (cooked_read_test): Likewise.
430         (cooked_write_test): Likewise.
431         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
432         (rs6000_gdbarch_init): Likewise.
433         * stabsread.c (stab_reg_to_regnum): Likewise.
434         * stack.c (info_frame_command): Likewise.
435         * target-descriptions.c (tdesc_register_name): Likewise.
436         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
437         * tui/tui-regs.c (tui_show_register_group): Likewise.
438         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
439         (user_reg_map_regnum_to_name): Likewise.
440         (value_of_user_reg): Likewise.
441         (maintenance_print_user_registers): Likewise.
442         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
443         (xtensa_register_name): Likewise.
444         (xtensa_register_type): Likewise.
445         (xtensa_reg_to_regnum): Likewise.
446         (xtensa_pseudo_register_read): Likewise.
447         (xtensa_pseudo_register_write): Likewise.
448
449 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
450
451         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
452         correctly-sized buffer with raw_read.
453         (amd64_pseudo_register_write): Use correctly-sized buffer for
454         raw_read/raw_write.
455
456 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
457
458         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
459         in add_prefix_cmd of set print type.
460
461 2018-10-19  Tom Tromey  <tom@tromey.com>
462
463         PR tui/18388:
464         * NEWS: Mention tabset deprecation.
465         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
466         (update_tab_width): New function.
467         (tui_set_tab_width, tui_show_tab_width): New functions.
468         (tui_set_tab_width_command): Use update_tab_width.
469         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
470         Add new "set tui tab-width" command.
471         * tui/tui-source.c (tui_set_source_content): Update.
472         * tui/tui-disasm.c (tui_set_disassem_content): Update.
473         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
474         Don't declare.
475         (tui_tab_width): Declare.
476         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
477         (tui_set_default_tab_len): Remove.
478
479 2018-10-19  Tom Tromey  <tom@tromey.com>
480
481         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
482         (key_is_backspace, tui_getc): Don't declare.
483         * tui/tui-io.c (key_is_start_sequence): Now static.
484         (key_is_end_sequence, key_is_backspace): Remove.
485         (tui_getc): Now static.
486
487 2018-10-19  Tom Tromey  <tom@tromey.com>
488
489         * symfile.c (reread_symbols): Clear "static_links".
490
491 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
492
493         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
494         define.
495         (aarch64_linux_sigframe_init): Extra boundary checks.
496
497 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
498
499         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
500         the possibly non-existent tdesc type 'vec128', but the type of raw
501         register v16 instead.
502
503 2018-10-19  Gary Benson <gbenson@redhat.com>
504
505         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
506
507 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
508
509         PR cli/23785
510         * cli/cli-dump.c (restore_binary_file): Check if "file" is
511         NULL.
512
513 2018-10-17  Paul Koning  <paul_koning@dell.com>
514
515         * charset.c (convert_between_encodings): Fix unsigned overflow.
516
517 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
518
519         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
520         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
521         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
522         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
523         New functions.
524         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
525         and fbsd_info_proc_mappings_header.
526         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
527         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
528         New.
529
530 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
531
532         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
533         Solaris Maintainer.
534
535 2018-10-15  Tom Tromey  <tom@tromey.com>
536
537         * tui/tui.c (strcat_to_buf): Remove casts.
538         * tui/tui-winsource.c (tui_show_source_line)
539         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
540         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
541         * tui/tui-windata.c (tui_first_data_item_displayed)
542         (tui_delete_data_content_windows, tui_erase_data_content)
543         (tui_display_all_data, tui_display_data_from)
544         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
545         * tui/tui-win.c (tui_set_win_height)
546         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
547         casts.
548         * tui/tui-win.c (tui_resize_all): Remove casts.
549         (tui_scroll_backward_command, tui_set_focus)
550         (tui_set_tab_width_command): Likewise.
551         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
552         * tui/tui-regs.c (tui_show_register_group): Remove cast.
553         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
554         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
555         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
556         Remove casts.
557
558 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
559
560         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
561         AArch64/ARM maintainer.
562
563 2018-10-11  Gary Benson <gbenson@redhat.com>
564
565         * interps.h (interp::m_name): Make private and mutable.
566         * interps.c (interp::~interp): Free m_name.
567
568 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
569             Simon Marchi <simark@simark.ca>
570
571         * README (`configure' options): Add documentation for new
572         "--enable-unit-tests" option.
573         * acinclude.m4: Include "selftest.m4".
574         * configure: Regenerate.
575         * configure.ac: Use "GDB_AC_SELFTEST".
576         * maint.c (maintenance_selftest): Update message informing
577         that selftests have been disabled.
578         (maintenance_info_selftests): Likewise.
579         * selftest.m4: New file.
580
581 2018-10-10  Gary Benson <gbenson@redhat.com>
582
583         * remote.c (remote_target::remote_send_printf): Add
584         missing va_end found by Coverity.
585
586 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
587
588         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
589
590 2018-10-09  Tom Tromey  <tom@tromey.com>
591
592         * configure: Rebuild.
593         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
594         * NEWS: Update --enable-ubsan documentation.
595
596 2018-10-09  Gary Benson <gbenson@redhat.com>
597
598         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
599         found by Coverity.
600
601 2018-10-08  Tom Tromey  <tom@tromey.com>
602
603         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
604         variable.
605         (riscv_fbsd_init_abi): Likewise.
606
607 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
608         * valops.c (value_struct_elt_for_reference): Rename local variable
609         to work around the shadowing a previous local warning.
610
611 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
612
613         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
614         * NEWS: Mention new FreeBSD/riscv native configuration.
615         * configure.host: Add riscv*-*-freebsd*.
616         * configure.nat: Likewise.
617         * riscv-fbsd-nat.c: New file.
618
619 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
620
621         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
622         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
623         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
624         * NEWS: Mention new FreeBSD/riscv target.
625         * configure.tgt: Add riscv*-*-freebsd*.
626         * riscv-fbsd-tdep.c: New file.
627         * riscv-fbsd-tdep.h: New file.
628
629 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
630
631         * regcache.h (struct regcache_map_entry): Note that this type can
632         be used with traditional frame caches.
633         * trad-frame.c (trad_frame_set_reg_regmap): New.
634         * trad-frame.h (trad_frame_set_reg_regmap): New.
635
636 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
637
638         PR c++/16841
639         * valops.c (get_virtual_base_offset): New function.
640         (value_struct_elt_for_reference): Use it to get virtual base offset
641         and add it in calculating class member address.
642
643 2018-10-08   John Darrington <john@darrington.wattle.id.au>
644
645     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
646       (check_producer): Check if the producer is codewarrior.
647       (producer_is_codewarrior): New function.
648       (lnp_state_machine::record_line): Ignore is_stmt flag for records
649        produced by codewarrior.
650       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
651
652 2018-10-06  Tom Tromey  <tom@tromey.com>
653
654         PR python/19399:
655         * python/py-inferior.c: Add "architecture" entry.
656         (infpy_architecture): New function.
657
658 2018-10-06  Tom Tromey  <tom@tromey.com>
659
660         PR python/21765:
661         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
662         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
663         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
664         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
665
666 2018-10-06  Tom Tromey  <tom@tromey.com>
667
668         PR build/17077:
669         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
670         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
671         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
672         #include.
673
674 2018-10-06  Tom Tromey  <tom@tromey.com>
675
676         * python/py-breakpoint.c (bppy_get_location): Handle a
677         bp_breakpoint without a location.
678
679 2018-10-06  Tom Tromey  <tom@tromey.com>
680
681         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
682         (_RegEx): Reformat help text.
683         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
684         (AnyCallerIs, AnyCallerMatches): Reformat help text.
685         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
686         text.
687         * python/lib/gdb/command/xmethods.py (InfoXMethod)
688         (EnableXMethod, DisableXMethod): Remove help indentation.
689         Capitalize meta-syntactic variables.
690         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
691         (EnableUnwinder, DisableUnwinder): Remove help indentation.
692         Capitalize meta-syntactic variables.
693         * python/lib/gdb/command/explore.py (ExploreCommand)
694         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
695         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
696         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
697         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
698         Remove help indentation.
699         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
700         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
701         (DisableFrameFilter, SetFrameFilterPriority)
702         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
703
704 2018-10-06  Tom Tromey  <tom@tromey.com>
705
706         PR tui/28819:
707         * tui/tui-io.c (gdb_wgetch): New function.
708         (tui_mld_getc, tui_getc): Use it.
709
710 2018-10-05  Tom Tromey  <tom@tromey.com>
711
712         * sol-thread.c (sol_thread_target::wait): Rename inner
713         "save_ptid".
714
715 2018-10-04  Tom Tromey  <tom@tromey.com>
716
717         * configure: Rebuild.
718         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
719
720 2018-10-04  Tom Tromey  <tom@tromey.com>
721
722         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
723         declaration of "block".
724
725 2018-10-04  Tom Tromey  <tom@tromey.com>
726
727         * common/filestuff.c (fdwalk): Remove inner declaration of
728         "result".
729
730 2018-10-04  Tom Tromey  <tom@tromey.com>
731
732         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
733         "structs_addr" and hoist declaration.
734
735 2018-10-04  Tom Tromey  <tom@tromey.com>
736
737         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
738         variable "size".
739
740 2018-10-04  Tom Tromey  <tom@tromey.com>
741
742         * mdebugread.c (parse_partial_symbols): Use std::string.
743
744 2018-10-04  Tom Tromey  <tom@tromey.com>
745
746         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
747         * p-valprint.c (pascal_val_print): Split inner "i" variable.
748         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
749         header.
750         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
751         more inner scope.
752         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
753         * varobj.c (varobj_update): Rename inner "newobj",
754         "type_changed".
755         * valprint.c (generic_emit_char): Rename inner "buf".
756         * valops.c (find_overload_match): Rename inner "temp".
757         (value_struct_elt_for_reference): Declare "v" in more inner
758         scope.
759         * v850-tdep.c (v850_push_dummy_call): Rename "len".
760         * unittests/array-view-selftests.c (run_tests): Rename inner
761         "vec".
762         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
763         header.
764         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
765         "tsv" in more inner scope.
766         (print_one_static_tracepoint_marker): Rename inner
767         "tuple_emitter".
768         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
769         (tic6x_push_dummy_call): Don't redeclare "addr".
770         * target-float.c: Declare "dto" lower.
771         * symtab.c (lookup_local_symbol): Rename inner "sym".
772         (find_pc_sect_line): Rename inner "pc".
773         * stack.c (print_frame): Don't redeclare "gdbarch".
774         (return_command): Rename inner "gdbarch".
775         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
776         "sp".
777         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
778         header.
779         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
780         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
781         scope.
782         * remote.c (remote_target::update_thread_list): Don't redeclare
783         "tp".
784         (remote_target::process_initial_stop_replies): Rename inner
785         "thread".
786         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
787         (remote_target::wait_as): Don't redeclare "stop_reply".
788         (remote_target::get_thread_local_address): Rename inner
789         "result".
790         (remote_target::get_tib_address): Likewise.
791
792         * regcache.c (cooked_read_test): Rename "regnum".
793         * record-btrace.c (cmd_record_btrace_start): Rename inner
794         "exception".
795         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
796         loop header.
797         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
798         header.
799         (ppu2spu_sniffer): Rename inner "buf".
800         * parse.c (operator_check_standard): Rename inner "type",
801         "objfile".
802         * p-valprint.c (pascal_val_print): Introduce new scope for
803         "low_bound", "high_bound".
804         * p-exp.y (yylex): Declare "i" in loop header.
805         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
806         Lower declaration of "s".
807         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
808         header.
809         (nios2_push_dummy_call): Rename "len".
810         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
811         "buf".
812         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
813         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
814         (linux_xfer_osdata_modules): Likewise.
815         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
816         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
817         (mips_o64_push_dummy_call): Likewise.
818         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
819         "op".
820         * mi/mi-main.c (list_available_thread_groups): Rename inner
821         "tuple_emitter".
822         (mi_cmd_data_read_memory): Rename inner "opts".
823         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
824         "tuple_emitter".
825         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
826         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
827         more inner scope.
828         (parse_partial_symbols): Rename inner "pst", "p", "name"
829         * main.c (captured_main_1): Rename inner "i"s.
830         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
831         "oso2".
832         * linux-tdep.c (linux_info_proc): Rename inner "filename".
833         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
834         * infrun.c (handle_no_resumed): Don't redeclare "thread".
835         (handle_signal_stop): Rename inner "gdbarch".
836         (handle_command): Declare "signum" in loop header.
837         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
838         "status".
839         (examine_prologue): Rename inner "sol" and "sof".
840         (ia64_extract_return_value): Rename inner "val".  Declare another
841         "val" in a more inner scope.
842         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
843         inner scope.
844         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
845         "except".
846         * findvar.c (default_read_var_value): Don't redeclare "addr".
847         * f-exp.y (yylex): Declare "i" in loop header.
848         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
849         Rename inner "type", "expect_type".
850         (evaluate_subexp_for_sizeof): Rename inner "pc".
851         * elfread.c (elf_symfile_read): Rename inner "abfd".
852         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
853         "bytes_read".
854         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
855         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
856         (dwarf_decode_line_header): Rename inner "lh".
857         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
858         "offset".  Declare "i" in loop header.
859         (disassemble_dwarf_expression): Rename inner "addr_size".
860         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
861         inner "result".
862         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
863         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
864         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
865         "inner_list_emitter".
866         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
867         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
868         declaration in a block.
869         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
870         * cp-valprint.c (cp_print_value_fields): Don't redeclare
871         "obstack_final_size".
872         * cp-support.c (inspect_type): Declare "i" in loop header.
873         * compile/compile.c (compile_instance::insert_symbol_error):
874         Rename inner "e".
875         * common/agent.c (agent_run_command): Remove inner "ret"
876         declaration.
877         * coffread.c (coff_symfile_read): Rename inner "name".
878         (coff_symfile_read): Rename inner "abfd".
879         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
880         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
881         "high".
882         * c-exp.y (lex_one_token): Move "len" declaration lower.
883         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
884         "gdbarch".
885         (create_exception_master_breakpoint): Likewise.  Don't redeclare
886         "b".
887         (watch_command_1): Declare "mark" later.
888         (clear_command): Don't shadow "a" or "b".
889         (delete_command): Rename inner "b".
890         (delete_trace_command): Likewise.
891         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
892         "op".
893         (arm_gdbarch_init): Remove inner "e_flags".
894         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
895         "offset" in inner blocks.
896
897 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
898
899         * dwarf-index-write.c (file_write): Don't write if the vector is
900         empty.
901
902 2018-10-05  Tom de Vries  <tdevries@suse.de>
903
904         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
905         PyArg_ParseTuple call.
906
907 2018-10-05  Tom de Vries  <tdevries@suse.de>
908
909         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
910         PyArg_ParseTuple call.
911
912 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
913
914         * psymtab.c (recursively_search_psymtabs): Reformat parameters
915         to avoid exceeding 80 characters per line limit.
916
917 2018-10-04  Tom Tromey  <tom@tromey.com>
918
919         * symfile.c (syms_from_objfile_1, finish_new_objfile)
920         (reread_symbols): Update.
921         * complaints.h (clear_complaints): Remove argument.
922         * complaints.c (enum complaint_series): Remove.
923         (series): Remove global.
924         (complaint_internal): Update.
925         (clear_complaints): Remove argument.
926
927 2018-10-04  Tom Tromey  <tom@tromey.com>
928
929         * symfile.c (symbol_file_add_with_addrs): Do not print "no
930         debugging symbols" message if there is a separate debug objfile.
931
932 2018-10-04  Tom Tromey  <tom@tromey.com>
933
934         PR cli/19551:
935         * symfile.c (symbol_file_add_with_addrs): Update output.
936         * psymtab.c (require_partial_symbols): Update output.
937
938 2018-10-04  Tom Tromey  <tom@tromey.com>
939
940         PR cli/22234:
941         * complaints.c: Emit \n.
942
943 2018-10-04  Tom Tromey  <tom@tromey.com>
944
945         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
946         (separate_debug_file_exists, find_separate_debug_file)
947         (add_symbol_file_command, reread_symbols, allocate_symtab)
948         (allocate_compunit_symtab): Use filtered printing, not
949         unfiltered.
950         * psymtab.c (require_partial_symbols, dump_psymtab)
951         (allocate_psymtab): Use filtered printing, not unfiltered.
952
953 2018-10-04  Tom Tromey  <tom@tromey.com>
954
955         * complaints.c (complaint_internal): Correctly check complaint
956         count.
957
958 2018-10-04  Tom Tromey  <tom@tromey.com>
959
960         * complaints.h (struct complaints): Remove declaration.
961         * complaints.c (clear_complaints): Remove an unused variable.
962
963 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
964
965         * MAINTAINERS (Write After Approval): Add self.
966
967 2018-10-03  Tom Tromey  <tom@tromey.com>
968
969         * guile/scm-value.c (gdbscm_value_to_string): Initialize
970         "buffer_contents".
971         * coffread.c (coff_symtab_read): Initialize "newobj".
972
973 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
974
975         * dwarf2read.c (read_func_scope): Remove struct keyword in
976         range-based for.
977
978 2018-10-03  Tom Tromey  <tom@tromey.com>
979
980         * README: Mention --enable-ubsan.
981         * NEWS: Mention --enable-ubsan.
982         * acinclude.m4: Include sanitize.m4.
983         * configure: Rebuild.
984         * configure.ac: Call AM_GDB_UBSAN.
985         * sanitize.m4: New file.
986
987 2018-10-03  Tom Tromey  <tom@tromey.com>
988
989         * expression.h (enum exp_opcode): Use uint8_t as base type.
990         * expprint.c (op_name): Handle invalid opcodes.
991
992 2018-10-03  Tom Tromey  <tom@tromey.com>
993
994         * parse.c (prefixify_expression): Add assert.
995         (parse_exp_in_context_1): Throw exception if the expression is
996         empty.
997
998 2018-10-03  Tom Tromey  <tom@tromey.com>
999
1000         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1001
1002 2018-10-03  Tom Tromey  <tom@tromey.com>
1003
1004         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1005
1006 2018-10-03  Tom Tromey  <tom@tromey.com>
1007
1008         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1009         unsigned.
1010
1011 2018-10-03  Tom Tromey  <tom@tromey.com>
1012
1013         * findvar.c (extract_integer): Do work in an unsigned type.
1014
1015 2018-10-03  Tom Tromey  <tom@tromey.com>
1016
1017         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1018         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1019         base type.
1020         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1021         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1022         type.
1023         * c-lang.h (enum c_string_type_values): Use unsigned as base
1024         type.
1025         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1026
1027 2018-10-03  Tom Tromey  <tom@tromey.com>
1028
1029         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1030         <~dwarf2_frame_state_reg_info>: Update.
1031         <dwarf2_frame_state_reg_info>: Update.
1032         <alloc_regs>: Add assertion.  Update.
1033         <reg>: Now a std::vector.
1034         <num_regs>: Remove.
1035         <swap>: Update.
1036         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1037         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1038
1039 2018-10-03  Tom Tromey  <tom@tromey.com>
1040
1041         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1042
1043 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1044
1045         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1046
1047 2018-10-02  Tom Tromey  <tom@tromey.com>
1048
1049         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1050
1051 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1052
1053         * NEWS: Mention changed commands.
1054         * ser-uds.c: New file.
1055         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1056         * configure: Regenerate.
1057         * Makefile.in: Add new file.
1058         * serial.c (serial_open): Check if filename is a socket
1059           and lookup the appropriate interface accordingly.
1060
1061 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1062
1063         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1064         define.
1065         (AARCH64_EXTRA_MAGIC): Likewise.
1066         (AARCH64_FPSIMD_MAGIC): Likewise.
1067         (AARCH64_SVE_MAGIC): Likewise.
1068         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1069         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1070         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1071         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1072         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1073         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1074         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1075         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1076         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1077         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1078         (read_aarch64_ctx): Add function.
1079         (aarch64_linux_sigframe_init): Detect FP registers.
1080
1081 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1082
1083         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1084         (AARCH64_D0_REGNUM): Likewise.
1085         (AARCH64_S0_REGNUM): Likewise.
1086         (AARCH64_H0_REGNUM): Likewise.
1087         (AARCH64_B0_REGNUM): Likewise.
1088         (AARCH64_SVE_V0_REGNUM): Likewise.
1089         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1090         (AARCH64_D0_REGNUM): Likewise.
1091         (AARCH64_S0_REGNUM): Likewise.
1092         (AARCH64_H0_REGNUM): Likewise.
1093         (AARCH64_B0_REGNUM): Likewise.
1094         (AARCH64_SVE_V0_REGNUM): Likewise.
1095
1096 2018-10-01  Gary Benson <gbenson@redhat.com>
1097
1098         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1099         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1100         prfpregset_t instead of gdb_prfpregset_t.
1101         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1102         * configure, config.in: Rebuild.
1103
1104 2018-10-01  Gary Benson <gbenson@redhat.com>
1105
1106         * common/gdb_proc_service.h: New file, factored out from...
1107         * gdb_proc_service.h: Moved common code to the above file.
1108         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1109
1110 2018-10-01  Gary Benson <gbenson@redhat.com>
1111
1112         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1113         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1114
1115 2018-10-01  Gary Benson <gbenson@redhat.com>
1116
1117         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1118         (AC_CHECK_HEADERS): Check for linux/elf.h.
1119         * configure, config.in: Rebuild.
1120         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1121         doesn't define elf_fpregset_t.
1122
1123 2018-10-01  Gary Benson <gbenson@redhat.com>
1124
1125         * gdb_proc_service.h: Whitespace change.
1126
1127 2018-10-01  Tom Tromey  <tom@tromey.com>
1128
1129         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1130         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1131         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1132
1133 2018-10-01  Tom Tromey  <tom@tromey.com>
1134
1135         * README: Minor change.
1136
1137 2018-09-30  Pedro Alves  <palves@redhat.com>
1138
1139         * darwin-nat-info.c (darwin_debug_regions_recurse)
1140         (info_mach_exceptions_command): Remove unused local variables.
1141         * darwin-nat.c (darwin_decode_notify_message)
1142         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1143         (darwin_stop_inferior, darwin_setup_exceptions)
1144         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1145         (darwin_nat_target::attach, darwin_nat_target::detach)
1146         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1147         local variables.
1148         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1149         variables.
1150
1151 2018-09-29  Tom Tromey  <tom@tromey.com>
1152
1153         * README: Remove some leftover text.
1154
1155 2018-09-29  Tom Tromey  <tom@tromey.com>
1156
1157         * PROBLEMS: Rewrite.
1158         * README: Update.
1159
1160 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1161
1162         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1163         case with explicit breakpoint kind.
1164         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1165         'additional_info' and related logic.
1166         (riscv_debug_breakpoints): New variable.
1167         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1168         instruction to determine the breakpoint kind.
1169         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1170         flag.  Update description of 'set/show riscv
1171         use-compressed-breakpoints' flag.
1172
1173 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1174
1175         (NEWS): Mention changes to frame related commands.
1176         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1177         (add_prefix_cmd_suppress_notification): New function.
1178         (add_com_suppress_notification): Call
1179         add_cmd_suppress_notification.
1180         * command.h (add_cmd_suppress_notification): Declare.
1181         (add_prefix_cmd_suppress_notification): Declare.
1182         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1183         (parse_frame_specification): Moved from stack.c, with
1184         simplification to handle a single argument.
1185         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1186         switch to the selected frame.  Add a header comment.
1187         * stack.c: Remove 'safe-ctype.h' include.
1188         (find_frame_for_function): Add declaration.
1189         (find_frame_for_address): New function.
1190         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1191         (frame_selection_by_function_completer): New function.
1192         (info_frame_command): Rename to...
1193         (info_frame_command_core): ...this, and update parameter types.
1194         (select_frame_command): Rename to...
1195         (select_frame_command_core): ...this, and update parameter types.
1196         (frame_command): Rename to...
1197         (frame_command_core): ...this, and update parameter types.
1198         (class frame_command_helper): New class to wrap implementations of
1199         frame related sub-commands.
1200         (frame_apply_cmd_list): New static global.
1201         (frame_cmd_list): Make static.
1202         (select_frame_cmd_list): New global for sub-commands.
1203         (info_frame_cmd_list): New global for sub-commands.
1204         (_initialize_stack): Register sub-commands for 'frame',
1205         'select-frame', and 'info frame'.  Update 'frame apply' commands
1206         to use frame_apply_cmd_list.  Move function local static
1207         frame_apply_list to file static frame_apply_cmd_list for
1208         consistency.
1209         * stack.h (select_frame_command): Delete declarationn.
1210         (select_frame_for_mi): Declare new function.
1211
1212 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1213
1214         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1215         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1216         and NOP.
1217
1218 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1219
1220         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1221
1222 2018-09-26  Tom Tromey  <tom@tromey.com>
1223
1224         * valops.c (auto_abandon): Remove dead code.
1225
1226 2018-09-26  Tom Tromey  <tom@tromey.com>
1227
1228         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1229
1230 2018-09-24  Tom Tromey  <tom@tromey.com>
1231
1232         * common/pathstuff.c (get_standard_cache_dir): Make
1233         "xdg_cache_home" and "home" const.
1234         * top.c (init_history): Make "tmpenv" const.
1235         * main.c (get_init_files): Make "homedir" const.
1236
1237 2018-09-23  Tom Tromey  <tom@tromey.com>
1238
1239         PR python/18852:
1240         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1241
1242 2018-09-23  Tom Tromey  <tom@tromey.com>
1243
1244         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1245         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1246         * python/python-internal.h (gdbpy_handle_exception): Declare.
1247         * python/py-utils.c (gdbpy_handle_exception): New function.
1248
1249 2018-09-23  Tom Tromey  <tom@tromey.com>
1250
1251         PR python/17284:
1252         * python/py-type.c (typy_template_argument): Check for negative
1253         argument number.
1254
1255 2018-09-23  Tom Tromey  <tom@tromey.com>
1256
1257         PR python/14062:
1258         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1259
1260 2018-09-23  Tom Tromey  <tom@tromey.com>
1261
1262         PR python/18170:
1263         * python/py-value.c (valpy_int): Allow conversion from pointer
1264         type.
1265
1266 2018-09-23  Tom Tromey  <tom@tromey.com>
1267
1268         PR python/20126:
1269         * python/py-value.c (valpy_int): Respect type sign.
1270
1271 2018-09-23  Tom Tromey  <tom@tromey.com>
1272
1273         PR python/18352;
1274         * python/py-value.c (valpy_float): Allow conversions from int or
1275         char.
1276         (valpy_int, valpy_long): Allow conversions from float.
1277
1278 2018-09-23  Tom Tromey  <tom@tromey.com>
1279
1280         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1281         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1282
1283 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1284
1285         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1286         __sighndlr.
1287         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1288
1289 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1290
1291         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1292         target_terminal::ours().
1293
1294 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1295
1296         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1297         of vl to ULONGEST.
1298
1299 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1300
1301         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1302         redundant condition.
1303
1304 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1305
1306         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1307
1308         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1309         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1310         * sol-thread.c (ps_pdmodel): Don't guard definition.
1311
1312         * procfs.c: Fix formatting.
1313
1314         * procfs.c (sysset_t_alloc): Remove.
1315         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1316         (procfs_debug_inferior): Likewise.
1317         (procfs_set_exec_trap): Likewise.
1318         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1319         (proc_set_traced_sysexit): Likewise.
1320
1321         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1322         (dead_procinfo): Likewise.
1323         (proc_warn): Likewise.
1324         (proc_error): Likewise.
1325         (proc_get_LDT_entry): Likewise.
1326         (do_attach): Likewise.
1327         (procfs_target::pid_to_str): Likewise.
1328         (iterate_over_mappings): Likewise.
1329
1330         * procfs.c (create_procinfo): Fix ARI warning.
1331         (proc_get_status): Likewise.
1332         (proc_stop_process): Likewise.
1333         (proc_run_process): Likewise.
1334         (proc_kill): Likewise.
1335         (proc_get_LDT_entry): Likewise.
1336         (procfs_find_LDT_entry): Likewise.
1337         (proc_update_threads): Likewise.
1338         (proc_iterate_over_threads): Likewise.
1339         (do_attach): Likewise.
1340         (procfs_xfer_memory): Likewise.
1341         (invalidate_cache): Likewise.
1342         (procfs_target::resume): Likewise.
1343         (procfs_init_inferior): Likewise.
1344         (procfs_set_exec_trap): Likewise.
1345         (procfs_target::thread_alive): Likewise.
1346         (procfs_target::pid_to_exec_file): Likewise.
1347         (iterate_over_mappings): Likewise.
1348         (procfs_target::make_corefile_notes): Likewise.
1349         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1350
1351         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1352         (procfs_find_LDT_entry): Likewise.
1353         * sol-thread.c (ps_lgetLDT): Likewise.
1354
1355 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1356
1357         PR tdep/17903
1358         * procfs.c (procfs_target): Declare pid_to_exec_file.
1359         (procfs_target::pid_to_exec_file): New.
1360
1361 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1362
1363         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1364         renaming.
1365         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1366         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1367
1368 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1369
1370         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1371         (supply_fpregset, fill_fpregset): Move ...
1372         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1373         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1374         Remove references to ioctl-based procfs.
1375         Include <sys/reg.h>.
1376         Remove PR_MODEL_NATIVE guards.
1377         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1378         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1379
1380 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1381
1382         PR gdb/20981:
1383         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1384         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1385         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1386
1387 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1388
1389         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1390         (fbsd_print_sockaddr_in6): Likewise.
1391
1392 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1393             Chris January  <chris.january@arm.com>
1394
1395         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1396         (evaluate_subexp_standard): Return a dummy type when
1397         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1398         OP_F77_UNDETERMINED_ARGLIST case.
1399         * expression.h (enum noside): Update comment.
1400
1401 2018-09-19  George Vasick <george.vasick@oracle.com>
1402
1403         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1404
1405 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1406             April Chin <april.chin@oracle.com>
1407             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1408
1409         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1410         uint_t lwpid_t.
1411         (create_procinfo): Print pids in /proc without leading zeros.
1412
1413 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1414
1415         * nios2-tdep.c (nios2_gcc_target_options): New.
1416         (nios2_gdb_arch_init): Install new hook.
1417
1418 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1419
1420         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1421         New file.
1422         * update-gnulib.sh: Apply patch.
1423         * configure: Re-generate.
1424
1425 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1426
1427         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1428         description.  Make "info proc" command descriptions more
1429         consistent.
1430
1431 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1432
1433         * NEWS: Mention 'info proc files' command.
1434
1435 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1436
1437         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1438         descriptors for IP_FILES and IP_ALL.
1439
1440 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1441
1442         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1443         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1444         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1445         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1446         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1447         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1448         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1449         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1450         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1451         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1452         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1453         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1454         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1455         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1456         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1457         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1458         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1459         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1460         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1461         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1462         (struct fbsd_sockaddr_un): New types.
1463         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1464         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1465         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1466         (fbsd_core_info_proc_files): New functions.
1467         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1468         IP_ALL.
1469         * fbsd-tdep.h (fbsd_info_proc_files_header)
1470         (fbsd_info_proc_files_entry): New.
1471
1472 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1473
1474         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1475         * infcmd.c (info_proc_cmd_files): New function.
1476         (_initialize_infcmd): Register 'info proc files' command.
1477
1478 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1479
1480         * gnulib/aclocal-m4-deps.mk: Re-generate.
1481         * gnulib/aclocal.m4: Re-generate.
1482         * gnulib/config.in: Re-generate.
1483         * gnulib/configure: Re-generate.
1484         * gnulib/import/Makefile.am: Re-generate.
1485         * gnulib/import/Makefile.in: Re-generate.
1486         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1487         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1488         * gnulib/import/arpa_inet.in.h: New file.
1489         * gnulib/import/inet_ntop.c: New file.
1490         * gnulib/import/m4/arpa_inet_h.m4: New file.
1491         * gnulib/import/m4/inet_ntop.m4: New file.
1492         * gnulib/import/m4/netinet_in_h.m4: New file.
1493         * gnulib/import/m4/socklen.m4: New file.
1494         * gnulib/import/m4/sockpfaf.m4: New file.
1495         * gnulib/import/m4/stdalign.m4: New file.
1496         * gnulib/import/m4/sys_uio_h.m4: New file.
1497         * gnulib/import/netinet_in.in.h: New file.
1498         * gnulib/import/stdalign.in.h: New file.
1499         * gnulib/import/sys_socket.c: New file.
1500         * gnulib/import/sys_socket.in.h: New file.
1501         * gnulib/import/sys_uio.in.h: New file.
1502         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1503         module.
1504
1505 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1506
1507         * gnulib/aclocal-m4-deps.mk: New file.
1508         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1509         deterministically.
1510
1511 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1512
1513         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1514         KVE_PATH.
1515
1516 2018-09-18  Tom Tromey  <tom@tromey.com>
1517
1518         * compile/compile-object-load.c (struct
1519         link_hash_table_cleanup_data): Add constructor and destructor.
1520         Use DISABLE_COPY_AND_ASSIGN.
1521         (~link_hash_table_cleanup_data): Rename from
1522         link_hash_table_free.  Now a destructor.
1523         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1524
1525 2018-09-18  Tom Tromey  <tom@tromey.com>
1526
1527         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1528         * compile/compile-object-load.c (struct munmap_list): Move to
1529         header file.
1530         (munmap_list::add): Rename from munmap_list_add; rewrite.
1531         (munmap_list::~munmap_list): Rename from munmap_list_free.
1532         (munmap_listp_free_cleanup): Remove.
1533         (compile_object_load): Update.
1534         * compile/compile-object-load.h (struct munmap_list): Move from
1535         compile-object-load.c.  Rewrite.
1536
1537 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1538
1539         * aarch64-tdep.c (pass_in_v): Use register size.
1540         (aarch64_extract_return_value): Likewise.
1541         (aarch64_store_return_value): Likewise.
1542
1543 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1544
1545         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1546         rlim_t.
1547
1548 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1549
1550         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1551         Fix short help line.
1552
1553 2018-09-17  Tom Tromey  <tom@tromey.com>
1554
1555         PR python/20445:
1556         * configure: Rebuild.
1557         * configure.ac: Conditionally use -DNDEBUG for Python.
1558
1559 2018-09-17  Tom Tromey  <tom@tromey.com>
1560
1561         * configure: Rebuild.
1562         * configure.ac: Use gmp as a library dependency when checking for
1563         mpfr.
1564
1565 2018-09-17  Pedro Alves  <palves@redhat.com>
1566
1567         * python/py-inferior.c (find_inferior_object): Delete.
1568
1569 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1570
1571         * compile/compile-cplus-types.c
1572         (compile_cplus_instance::enter_scope): Don't use new_scope after
1573         std::move.
1574
1575 2018-09-17  Tom Tromey  <tom@tromey.com>
1576
1577         * common/pathstuff.c (get_standard_cache_dir): Use
1578         ~/Library/Caches on macOS.
1579         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1580
1581 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1582
1583         PR python/23669
1584         * breakpoint.c (commands_cmd_element): New.
1585         (_initialize_breakpoint): Assign commands_cmd_element.
1586         * breakpoint.h (commands_cmd_element): New.
1587         * cli/cli-script.c (while_cmd_element, if_command,
1588         define_cmd_element): New.
1589         (command_name_equals): Remove.
1590         (process_next_line): Compare commands by pointer, not by name.
1591         (_initialize_cli_script): Assign the various cmd_list_element
1592         variables.
1593         * compile/compile.c (compile_cmd_element): New.
1594         (_initialize_compile): Assign compile_cmd_element.
1595         * compile/compile.h (compile_cmd_element): New.
1596         * guile/guile.c (guile_cmd_element): New.
1597         (install_gdb_commands): Assign guile_cmd_element.
1598         * guile/guile.h (guile_cmd_element): New.
1599         * python/python.c (python_cmd_element): New.
1600         (_initialize_python): Assign python_cmd_element.
1601         * python/python.h (python_cmd_element): New.
1602         * tracepoint.c (while_stepping_cmd_element): New.
1603         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1604         * tracepoint.h (while_stepping_cmd_element): New.
1605
1606 2018-09-17  Tom Tromey  <tom@tromey.com>
1607
1608         * infrun.c (save_infcall_suspend_state): Return
1609         infcall_suspend_state_up.
1610         (save_infcall_control_state): Return infcall_control_state_up.
1611         * inferior.h (save_infcall_suspend_state)
1612         (save_infcall_control_state): Declare later.  Return unique
1613         pointers.
1614
1615 2018-09-17  Tom Tromey  <tom@tromey.com>
1616
1617         * infrun.c (struct stop_context): Declare constructor,
1618         destructor, "changed" method.
1619         (stop_context::stop_context): Rename from save_stop_context.
1620         (stop_context::~stop_context): Rename from
1621         release_stop_context_cleanup.
1622         (normal_stop): Update.
1623         (stop_context::changed): Rename from stop_context_changed.  Return
1624         bool.
1625
1626 2018-09-17  Tom Tromey  <tom@tromey.com>
1627
1628         * inferior.h (struct infcall_suspend_state_deleter): New.
1629         (infcall_suspend_state_up): New typedef.
1630         (struct infcall_control_state_deleter): New.
1631         (infcall_control_state_up): New typedef.
1632         (make_cleanup_restore_infcall_suspend_state)
1633         (make_cleanup_restore_infcall_control_state): Don't declare.
1634         * infcall.c (call_function_by_hand_dummy): Update.
1635         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1636         (make_cleanup_restore_infcall_suspend_state): Remove.
1637         (do_restore_infcall_control_state_cleanup)
1638         (make_cleanup_restore_infcall_control_state): Remove.
1639
1640 2018-09-17  Tom Tromey  <tom@tromey.com>
1641
1642         * gdbthread.h (struct thread_control_state): Add initializer.
1643         (class thread_info) <control>: Remove initializer.
1644         * inferior.h (struct inferior_control_state): Add initializer.
1645         (class inferior) <control>: Remove initializer.
1646         (exit_inferior_1): Update.
1647         * infrun.c (struct infcall_control_state): Add constructors.
1648         (save_infcall_control_state): Use new.
1649         (restore_infcall_control_state, discard_infcall_control_state):
1650         Use delete.
1651
1652 2018-09-17  Tom Tromey  <tom@tromey.com>
1653
1654         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1655         unique_ptr.
1656         <siginfo_data>: Now a unique_xmalloc_ptr.
1657         (save_infcall_suspend_state, restore_infcall_suspend_state)
1658         (discard_infcall_suspend_state)
1659         (get_infcall_suspend_state_regcache): Update.
1660
1661 2018-09-17  Tom Tromey  <tom@tromey.com>
1662
1663         * gdbthread.h (struct thread_suspend_state): Add initializers.
1664         (class thread_info) <suspend>: Remove initializer.
1665         * infrun.c (struct infcall_suspend_state): Add initializers.
1666         (save_infcall_suspend_state): Use new.
1667         (discard_infcall_suspend_state): Use delete.
1668
1669 2018-09-16  Tom Tromey  <tom@tromey.com>
1670
1671         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1672         Remove.
1673         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1674         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1675         (py_varobj_iter_new): Likewise.
1676         (py_varobj_get_iterator): Use gdbpy_ref.
1677
1678 2018-09-16  Tom Tromey  <tom@tromey.com>
1679
1680         * python/py-threadevent.c (py_get_event_thread): Simplify.
1681         * python/py-inferior.c (infpy_thread_from_thread_handle):
1682         Return immediately after calling thread_to_thread_object.  Use
1683         Py_RETURN_NONE.
1684         (thread_to_thread_object): Set the exception on a NULL return.
1685
1686 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1687
1688         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1689
1690 2018-09-16  Tom Tromey  <tom@tromey.com>
1691
1692         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1693         Remove.
1694
1695 2018-09-16  Tom Tromey  <tom@tromey.com>
1696
1697         * python/python-internal.h (thread_to_thread_object): Change
1698         return type.
1699         * python/py-inferior.c (thread_to_thread_object): Return a new
1700         reference.
1701         (infpy_thread_from_thread_handle): Update.
1702         * python/py-infthread.c (gdbpy_selected_thread): Update.
1703         * python/py-stopevent.c (create_stop_event_object): Update.
1704         * python/py-threadevent.c (py_get_event_thread): Return a new
1705         reference.
1706         (py_get_event_thread): Update.
1707         * python/py-event.h (py_get_event_thread): Change return type.
1708         * python/py-continueevent.c (create_continue_event_object):
1709         Update.
1710
1711 2018-09-16  Tom Tromey  <tom@tromey.com>
1712
1713         * python/py-progspace.c (pspy_get_objfiles): Update.
1714         * python/python-internal.h (objfile_to_objfile_object): Change
1715         return type.
1716         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1717         Update.
1718         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1719         Update.
1720         * python/python.c (gdbpy_get_current_objfile): Update.
1721         (gdbpy_objfiles): Update.
1722         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1723         Update.
1724         (objfile_to_objfile_object): Return a new reference.
1725         * python/py-symtab.c (stpy_get_objfile): Update.
1726         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1727         Update.
1728
1729 2018-09-16  Tom Tromey  <tom@tromey.com>
1730
1731         * python/py-inferior.c (infpy_get_progspace): Update.
1732         * python/python-internal.h (pspace_to_pspace_object): Change
1733         return type.
1734         * python/py-newobjfileevent.c
1735         (create_clear_objfiles_event_object): Update.
1736         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1737         Update.
1738         * python/python.c (gdbpy_get_current_progspace): Update.
1739         (gdbpy_progspaces): Update.
1740         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1741         reference.
1742         * python/py-objfile.c (objfpy_get_progspace): Update.
1743         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1744         Update.
1745
1746 2018-09-16  Tom Tromey  <tom@tromey.com>
1747
1748         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1749         (solib_name, block_for_pc, find_pc_line): New functions.
1750         (execute_unwinders): Update.
1751         * python/py-block.c (gdbpy_block_for_pc): Remove.
1752         * python/py-inferior.c (infpy_get_progspace): New function.
1753         (inferior_object_getset) <progspace>: Add.
1754         * python/py-progspace.c (pspy_objfiles): Rewrite.
1755         (pspy_solib_name, pspy_block_for_pc)
1756         (pspy_find_pc_line, pspy_is_valid): New functions.
1757         (progspace_object_methods): Add entries for solib_name,
1758         block_for_pc, find_pc_line, is_valid.
1759         * python/python-internal.h (gdbpy_block_for_pc)
1760         (build_objfiles_list): Don't declare.
1761         * python/python.c: Don't include solib.h.
1762         (gdbpy_solib_name, gdbpy_find_pc_line)
1763         (gdbpy_get_current_progspace, build_objfiles_list)
1764         (gdbpy_objfiles): Remove.
1765         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1766         solib_name, find_pc_line>: Remove entries.
1767
1768 2018-09-16  Tom Tromey  <tom@tromey.com>
1769
1770         * top.c (new_ui_command): Use GNU style for metasyntactic
1771         variables.
1772         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1773         variables.
1774         * maint.c (maintenance_translate_address): Remove "<>" around
1775         text.
1776         * interps.c (interpreter_exec_cmd): Use GNU style for
1777         metasyntactic variables.
1778         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1779         metasyntactic variables.
1780         * tracepoint.c (tfind_range_command): Use GNU style for
1781         metasyntactic variables.
1782         (tfind_outside_command): Likewise.
1783         (_initialize_tracepoint): Likewise.
1784         * remote.c (extended_remote_target::create_inferior): Use GNU
1785         style for metasyntactic variables.
1786         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1787         metasyntactic variables.
1788         (adi_assign_command): Likewise.
1789
1790 2018-09-16  Tom Tromey  <tom@tromey.com>
1791
1792         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1793         metasyntactic variables.  Print message if no disassembler options
1794         are available.
1795
1796 2018-09-15  Tom Tromey  <tom@tromey.com>
1797
1798         * infcmd.c (get_inferior_args): Return const char *.
1799         * inferior.h (get_inferior_args): Return type now const.
1800         * linux-tdep.c (linux_fill_prpsinfo): Update.
1801         * procfs.c (procfs_target::make_corefile_notes): Update.
1802
1803 2018-09-07  Tom Tromey  <tom@tromey.com>
1804
1805         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1806         inside the TRY.
1807
1808 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1809
1810         * nios2-tdep.c (nios2_type_align): New.
1811         (nios2_gdb_arch_init): Install type_align hook.
1812
1813 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1814
1815         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1816         type that is neither object file owned, nor gdbarch owned.
1817         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1818         gdbarch is non-NULL.
1819         (alloc_type_instance): Allocate non-objfile owned types on the
1820         gdbarch obstack.
1821         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1822         using TYPE_ALLOC to ensure memory is allocated on the correct
1823         obstack.
1824         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1825         obstack, or the gdbarch obstack.
1826         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1827
1828 2018-09-14  Tom Tromey  <tom@tromey.com>
1829
1830         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1831         block.
1832
1833 2018-09-14  Tom Tromey  <tom@tromey.com>
1834
1835         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1836
1837 2018-09-13  Tom Tromey  <tom@tromey.com>
1838
1839         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1840         static.
1841
1842 2018-09-13  Tom Tromey  <tom@tromey.com>
1843
1844         * exec.c (try_open_exec_file): Use std::string.
1845
1846 2018-09-13  Tom Tromey  <tom@tromey.com>
1847
1848         * utils.h (gdb_bfd_errmsg): Return std::string.
1849         * exec.c (exec_file_attach): Update.
1850         * compile/compile-object-load.c (compile_object_load): Update.
1851         * utils.c (gdb_bfd_errmsg): Return std::string.
1852
1853 2018-09-13  Tom Tromey  <tom@tromey.com>
1854
1855         * procfs.c (struct procinfo_deleter): New.
1856         (procinfo_up): New typedef.
1857         (do_destroy_procinfo_cleanup): Remove.
1858         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1859
1860 2018-09-13  Tom Tromey  <tom@tromey.com>
1861
1862         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1863
1864 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1865 2018-09-13  Tom Tromey  <tom@tromey.com>
1866
1867         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1868         (pspy_get_objfiles): New function.
1869         (progspace_object_methods): New.
1870         (pspace_object_type): Add tp_methods callback.
1871         * python/python-internal.h (build_objfiles_list): New
1872         declaration.
1873         * python/python.c (build_objfiles_list): New function.
1874         (gdbpy_objfiles): Implement using build_objfiles_list.
1875         * NEWS: Mention the Progspace.objfiles method.
1876
1877 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1878
1879         * python/py-inferior.c (infpy_get_progspace): New function.
1880         (inferior_object_getset): Add progspace property.
1881         * NEWS: Mention the new property.
1882
1883 2018-09-13  Tom Tromey  <tom@tromey.com>
1884
1885         PR rust/23650:
1886         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1887
1888 2018-09-13  Tom Tromey  <tom@tromey.com>
1889
1890         PR rust/23626:
1891         * rust-lang.c (rust_enum_variant): Now static.
1892         (rust_empty_enum_p): New function.
1893         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1894         Handle empty enum.
1895
1896 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1897
1898         * python/py-inferior.c (infpy_repr): New.
1899         (inferior_object_type): Register infpy_repr.
1900         * python/py-objfile.c (objfpy_repr): New.
1901         (objfile_object_type): Register objfpy_repr.
1902
1903 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1904
1905         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1906
1907 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1908
1909         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1910         typo.
1911
1912 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1913
1914         * common/common-utils.c: Don't include '<sys/stat.h>'.
1915         (is_regular_file): Move to...
1916         * common/filestuff.c (is_regular_file): ... here.
1917         * common/common-utils.h (is_regular_file): Move to...
1918         * common/filestuff.h (is_regular_file): ... here.
1919
1920 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1921
1922         * skip.c (debug_skip): New variable.
1923         (skiplist_entry::do_skip_file_p): Add debug output.
1924         (skiplist_entry::do_skip_gfile_p): Likewise.
1925         (skiplist_entry::skip_function_p): Likewise.
1926         (_initialize_step_skip): Create debug command.
1927         * NEWS: Mention set/show debug skip.
1928
1929 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1930
1931         * darwin-nat.c (should_disable_startup_with_shell):
1932         New function.
1933         (darwin_nat_target::create_inferior): Add call.
1934
1935 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1936
1937         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1938         inf_port, msg_state>: Initialize.
1939         (struct darwin_thread_info) <signaled, single_step>: Change
1940         type and initialize.
1941         (struct darwin_thread_info) <event>: Initialize.
1942
1943 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1944
1945         PR gdb/23555
1946         PR gdb/23558
1947         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1948         guesses.
1949
1950 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1951
1952         Revert:
1953         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1954
1955         PR gdb/23555
1956         PR gdb/23558
1957         * gnulib/aclocal.m4: Regenerate.
1958         * gnulib/config.in: Regenerate.
1959         * gnulib/configure: Regenerate.
1960         * gnulib/import/Makefile.am: Update.
1961         * gnulib/import/Makefile.in: Update.
1962         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1963         * gnulib/import/_Noreturn.h: ... this.
1964         * gnulib/import/alloca.in.h: Update.
1965         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1966         * gnulib/import/arg-nonnull.h: ... this.
1967         * gnulib/import/assure.h: Update.
1968         * gnulib/import/at-func.c: Update.
1969         * gnulib/import/basename-lgpl.c: Update.
1970         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1971         * gnulib/import/c++defs.h: ... this.
1972         * gnulib/import/canonicalize-lgpl.c: Update.
1973         * gnulib/import/cdefs.h: Update.
1974         * gnulib/import/chdir-long.c: Update.
1975         * gnulib/import/chdir-long.h: Update.
1976         * gnulib/import/cloexec.c: Update.
1977         * gnulib/import/cloexec.h: Update.
1978         * gnulib/import/close.c: Update.
1979         * gnulib/import/closedir.c: Update.
1980         * gnulib/import/config.charset: Update.
1981         * gnulib/import/dirent-private.h: Update.
1982         * gnulib/import/dirent.in.h: Update.
1983         * gnulib/import/dirfd.c: Update.
1984         * gnulib/import/dirname-lgpl.c: Update.
1985         * gnulib/import/dirname.h: Update.
1986         * gnulib/import/dosname.h: Update.
1987         * gnulib/import/dup-safer-flag.c: Update.
1988         * gnulib/import/dup-safer.c: Update.
1989         * gnulib/import/dup.c: Update.
1990         * gnulib/import/dup2.c: Update.
1991         * gnulib/import/errno.in.h: Update.
1992         * gnulib/import/error.c: Update.
1993         * gnulib/import/error.h: Update.
1994         * gnulib/import/exitfail.c: Update.
1995         * gnulib/import/exitfail.h: Update.
1996         * gnulib/import/extra/update-copyright: Update.
1997         * gnulib/import/fchdir.c: Update.
1998         * gnulib/import/fcntl.c: Update.
1999         * gnulib/import/fcntl.in.h: Update.
2000         * gnulib/import/fd-hook.c: Update.
2001         * gnulib/import/fd-hook.h: Update.
2002         * gnulib/import/fd-safer-flag.c: Update.
2003         * gnulib/import/fd-safer.c: Update.
2004         * gnulib/import/fdopendir.c: Update.
2005         * gnulib/import/filename.h: Update.
2006         * gnulib/import/filenamecat-lgpl.c: Update.
2007         * gnulib/import/filenamecat.h: Update.
2008         * gnulib/import/flexmember.h: Update.
2009         * gnulib/import/float+.h: Update.
2010         * gnulib/import/float.c: Update.
2011         * gnulib/import/float.in.h: Update.
2012         * gnulib/import/fnmatch.c: Update.
2013         * gnulib/import/fnmatch.in.h: Update.
2014         * gnulib/import/fnmatch_loop.c: Update.
2015         * gnulib/import/fpucw.h: Update.
2016         * gnulib/import/frexp.c: Update.
2017         * gnulib/import/frexpl.c: Update.
2018         * gnulib/import/fstat.c: Update.
2019         * gnulib/import/fstatat.c: Update.
2020         * gnulib/import/getcwd-lgpl.c: Update.
2021         * gnulib/import/getcwd.c: Update.
2022         * gnulib/import/getdtablesize.c: Update.
2023         * gnulib/import/getlogin_r.c: Update.
2024         * gnulib/import/getprogname.c: Update.
2025         * gnulib/import/getprogname.h: Update.
2026         * gnulib/import/gettext.h: Update.
2027         * gnulib/import/gettimeofday.c: Update.
2028         * gnulib/import/glob-libc.h: Update.
2029         * gnulib/import/glob.c: Update.
2030         * gnulib/import/glob.in.h: Update.
2031         * gnulib/import/glob_internal.h: Update.
2032         * gnulib/import/glob_pattern_p.c: Update.
2033         * gnulib/import/globfree.c: Update.
2034         * gnulib/import/hard-locale.c: Update.
2035         * gnulib/import/hard-locale.h: Update.
2036         * gnulib/import/intprops.h: Update.
2037         * gnulib/import/inttypes.in.h: Update.
2038         * gnulib/import/isnan.c: Update.
2039         * gnulib/import/isnand-nolibm.h: Update.
2040         * gnulib/import/isnand.c: Update.
2041         * gnulib/import/isnanl-nolibm.h: Update.
2042         * gnulib/import/isnanl.c: Update.
2043         * gnulib/import/itold.c: Update.
2044         * gnulib/import/libc-config.h: Update.
2045         * gnulib/import/limits.in.h: Update.
2046         * gnulib/import/localcharset.c: Update.
2047         * gnulib/import/localcharset.h: Update.
2048         * gnulib/import/localtime-buffer.c: Update.
2049         * gnulib/import/localtime-buffer.h: Update.
2050         * gnulib/import/lstat.c: Update.
2051         * gnulib/import/m4/00gnulib.m4: Update.
2052         * gnulib/import/m4/__inline.m4: Update.
2053         * gnulib/import/m4/absolute-header.m4: Update.
2054         * gnulib/import/m4/alloca.m4: Update.
2055         * gnulib/import/m4/builtin-expect.m4: Update.
2056         * gnulib/import/m4/canonicalize.m4: Update.
2057         * gnulib/import/m4/chdir-long.m4: Update.
2058         * gnulib/import/m4/close.m4: Update.
2059         * gnulib/import/m4/closedir.m4: Update.
2060         * gnulib/import/m4/configmake.m4: Update.
2061         * gnulib/import/m4/d-ino.m4: Update.
2062         * gnulib/import/m4/d-type.m4: Update.
2063         * gnulib/import/m4/dirent_h.m4: Update.
2064         * gnulib/import/m4/dirfd.m4: Update.
2065         * gnulib/import/m4/dirname.m4: Update.
2066         * gnulib/import/m4/double-slash-root.m4: Update.
2067         * gnulib/import/m4/dup.m4: Update.
2068         * gnulib/import/m4/dup2.m4: Update.
2069         * gnulib/import/m4/eealloc.m4: Update.
2070         * gnulib/import/m4/environ.m4: Update.
2071         * gnulib/import/m4/errno_h.m4: Update.
2072         * gnulib/import/m4/error.m4: Update.
2073         * gnulib/import/m4/exponentd.m4: Update.
2074         * gnulib/import/m4/exponentl.m4: Update.
2075         * gnulib/import/m4/extensions.m4: Update.
2076         * gnulib/import/m4/extern-inline.m4: Update.
2077         * gnulib/import/m4/fchdir.m4: Update.
2078         * gnulib/import/m4/fcntl-o.m4: Update.
2079         * gnulib/import/m4/fcntl.m4: Update.
2080         * gnulib/import/m4/fcntl_h.m4: Update.
2081         * gnulib/import/m4/fdopendir.m4: Update.
2082         * gnulib/import/m4/filenamecat.m4: Update.
2083         * gnulib/import/m4/flexmember.m4: Update.
2084         * gnulib/import/m4/float_h.m4: Update.
2085         * gnulib/import/m4/fnmatch.m4: Update.
2086         * gnulib/import/m4/fnmatch_h.m4: Update.
2087         * gnulib/import/m4/fpieee.m4: Update.
2088         * gnulib/import/m4/frexp.m4: Update.
2089         * gnulib/import/m4/frexpl.m4: Update.
2090         * gnulib/import/m4/fstat.m4: Update.
2091         * gnulib/import/m4/fstatat.m4: Update.
2092         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2093         * gnulib/import/m4/getcwd-path-max.m4: Update.
2094         * gnulib/import/m4/getcwd.m4: Update.
2095         * gnulib/import/m4/getdtablesize.m4: Update.
2096         * gnulib/import/m4/getlogin.m4: Update.
2097         * gnulib/import/m4/getlogin_r.m4: Update.
2098         * gnulib/import/m4/getpagesize.m4: Update.
2099         * gnulib/import/m4/getprogname.m4: Update.
2100         * gnulib/import/m4/gettimeofday.m4: Update.
2101         * gnulib/import/m4/glibc21.m4: Update.
2102         * gnulib/import/m4/glob.m4: Update.
2103         * gnulib/import/m4/glob_h.m4: Update.
2104         * gnulib/import/m4/gnulib-cache.m4: Update.
2105         * gnulib/import/m4/gnulib-common.m4: Update.
2106         * gnulib/import/m4/gnulib-comp.m4: Update.
2107         * gnulib/import/m4/gnulib-tool.m4: Update.
2108         * gnulib/import/m4/hard-locale.m4: Update.
2109         * gnulib/import/m4/include_next.m4: Update.
2110         * gnulib/import/m4/inttypes-pri.m4: Update.
2111         * gnulib/import/m4/inttypes.m4: Update.
2112         * gnulib/import/m4/isnand.m4: Update.
2113         * gnulib/import/m4/isnanl.m4: Update.
2114         * gnulib/import/m4/largefile.m4: Update.
2115         * gnulib/import/m4/limits-h.m4: Update.
2116         * gnulib/import/m4/localcharset.m4: Update.
2117         * gnulib/import/m4/locale-fr.m4: Update.
2118         * gnulib/import/m4/locale-ja.m4: Update.
2119         * gnulib/import/m4/locale-zh.m4: Update.
2120         * gnulib/import/m4/localtime-buffer.m4: Update.
2121         * gnulib/import/m4/longlong.m4: Update.
2122         * gnulib/import/m4/lstat.m4: Update.
2123         * gnulib/import/m4/malloc.m4: Update.
2124         * gnulib/import/m4/malloca.m4: Update.
2125         * gnulib/import/m4/math_h.m4: Update.
2126         * gnulib/import/m4/mbrtowc.m4: Update.
2127         * gnulib/import/m4/mbsinit.m4: Update.
2128         * gnulib/import/m4/mbsrtowcs.m4: Update.
2129         * gnulib/import/m4/mbstate_t.m4: Update.
2130         * gnulib/import/m4/memchr.m4: Update.
2131         * gnulib/import/m4/memmem.m4: Update.
2132         * gnulib/import/m4/mempcpy.m4: Update.
2133         * gnulib/import/m4/memrchr.m4: Update.
2134         * gnulib/import/m4/mkdir.m4: Update.
2135         * gnulib/import/m4/mkstemp.m4: Update.
2136         * gnulib/import/m4/mmap-anon.m4: Update.
2137         * gnulib/import/m4/mode_t.m4: Update.
2138         * gnulib/import/m4/msvc-inval.m4: Update.
2139         * gnulib/import/m4/msvc-nothrow.m4: Update.
2140         * gnulib/import/m4/multiarch.m4: Update.
2141         * gnulib/import/m4/nocrash.m4: Update.
2142         * gnulib/import/m4/off_t.m4: Update.
2143         * gnulib/import/m4/onceonly.m4: Update.
2144         * gnulib/import/m4/open-cloexec.m4: Update.
2145         * gnulib/import/m4/open.m4: Update.
2146         * gnulib/import/m4/openat.m4: Update.
2147         * gnulib/import/m4/opendir.m4: Update.
2148         * gnulib/import/m4/pathmax.m4: Update.
2149         * gnulib/import/m4/rawmemchr.m4: Update.
2150         * gnulib/import/m4/readdir.m4: Update.
2151         * gnulib/import/m4/readlink.m4: Update.
2152         * gnulib/import/m4/realloc.m4: Update.
2153         * gnulib/import/m4/rename.m4: Update.
2154         * gnulib/import/m4/rewinddir.m4: Update.
2155         * gnulib/import/m4/rmdir.m4: Update.
2156         * gnulib/import/m4/save-cwd.m4: Update.
2157         * gnulib/import/m4/secure_getenv.m4: Update.
2158         * gnulib/import/m4/setenv.m4: Update.
2159         * gnulib/import/m4/signal_h.m4: Update.
2160         * gnulib/import/m4/ssize_t.m4: Update.
2161         * gnulib/import/m4/stat-time.m4: Update.
2162         * gnulib/import/m4/stat.m4: Update.
2163         * gnulib/import/m4/std-gnu11.m4: Update.
2164         * gnulib/import/m4/stdbool.m4: Update.
2165         * gnulib/import/m4/stddef_h.m4: Update.
2166         * gnulib/import/m4/stdint.m4: Update.
2167         * gnulib/import/m4/stdio_h.m4: Update.
2168         * gnulib/import/m4/stdlib_h.m4: Update.
2169         * gnulib/import/m4/strchrnul.m4: Update.
2170         * gnulib/import/m4/strdup.m4: Update.
2171         * gnulib/import/m4/strerror.m4: Update.
2172         * gnulib/import/m4/string_h.m4: Update.
2173         * gnulib/import/m4/strstr.m4: Update.
2174         * gnulib/import/m4/strtok_r.m4: Update.
2175         * gnulib/import/m4/sys_socket_h.m4: Update.
2176         * gnulib/import/m4/sys_stat_h.m4: Update.
2177         * gnulib/import/m4/sys_time_h.m4: Update.
2178         * gnulib/import/m4/sys_types_h.m4: Update.
2179         * gnulib/import/m4/tempname.m4: Update.
2180         * gnulib/import/m4/time_h.m4: Update.
2181         * gnulib/import/m4/unistd-safer.m4: Update.
2182         * gnulib/import/m4/unistd_h.m4: Update.
2183         * gnulib/import/m4/warn-on-use.m4: Update.
2184         * gnulib/import/m4/wchar_h.m4: Update.
2185         * gnulib/import/m4/wchar_t.m4: Update.
2186         * gnulib/import/m4/wctype_h.m4: Update.
2187         * gnulib/import/m4/wint_t.m4: Update.
2188         * gnulib/import/malloc.c: Update.
2189         * gnulib/import/malloc/scratch_buffer.h: Update.
2190         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2191         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2192         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2193         * gnulib/import/malloca.c: Update.
2194         * gnulib/import/malloca.h: Update.
2195         * gnulib/import/malloca.valgrind: Update.
2196         * gnulib/import/math.in.h: Update.
2197         * gnulib/import/mbrtowc.c: Update.
2198         * gnulib/import/mbsinit.c: Update.
2199         * gnulib/import/mbsrtowcs-impl.h: Update.
2200         * gnulib/import/mbsrtowcs-state.c: Update.
2201         * gnulib/import/mbsrtowcs.c: Update.
2202         * gnulib/import/memchr.c: Update.
2203         * gnulib/import/memmem.c: Update.
2204         * gnulib/import/mempcpy.c: Update.
2205         * gnulib/import/memrchr.c: Update.
2206         * gnulib/import/mkdir.c: Update.
2207         * gnulib/import/mkstemp.c: Update.
2208         * gnulib/import/msvc-inval.c: Update.
2209         * gnulib/import/msvc-inval.h: Update.
2210         * gnulib/import/msvc-nothrow.c: Update.
2211         * gnulib/import/msvc-nothrow.h: Update.
2212         * gnulib/import/open.c: Update.
2213         * gnulib/import/openat-die.c: Update.
2214         * gnulib/import/openat-priv.h: Update.
2215         * gnulib/import/openat-proc.c: Update.
2216         * gnulib/import/openat.c: Update.
2217         * gnulib/import/openat.h: Update.
2218         * gnulib/import/opendir.c: Update.
2219         * gnulib/import/pathmax.h: Update.
2220         * gnulib/import/pipe-safer.c: Update.
2221         * gnulib/import/rawmemchr.c: Update.
2222         * gnulib/import/readdir.c: Update.
2223         * gnulib/import/readlink.c: Update.
2224         * gnulib/import/realloc.c: Update.
2225         * gnulib/import/ref-add.sin: Update.
2226         * gnulib/import/ref-del.sin: Update.
2227         * gnulib/import/rename.c: Update.
2228         * gnulib/import/rewinddir.c: Update.
2229         * gnulib/import/rmdir.c: Update.
2230         * gnulib/import/same-inode.h: Update.
2231         * gnulib/import/save-cwd.c: Update.
2232         * gnulib/import/save-cwd.h: Update.
2233         * gnulib/import/scratch_buffer.h: Update.
2234         * gnulib/import/secure_getenv.c: Update.
2235         * gnulib/import/setenv.c: Update.
2236         * gnulib/import/signal.in.h: Update.
2237         * gnulib/import/stat-time.c: Update.
2238         * gnulib/import/stat-time.h: Update.
2239         * gnulib/import/stat-w32.c: Update.
2240         * gnulib/import/stat-w32.h: Update.
2241         * gnulib/import/stat.c: Update.
2242         * gnulib/import/stdbool.in.h: Update.
2243         * gnulib/import/stddef.in.h: Update.
2244         * gnulib/import/stdint.in.h: Update.
2245         * gnulib/import/stdio.in.h: Update.
2246         * gnulib/import/stdlib.in.h: Update.
2247         * gnulib/import/str-two-way.h: Update.
2248         * gnulib/import/strchrnul.c: Update.
2249         * gnulib/import/strdup.c: Update.
2250         * gnulib/import/streq.h: Update.
2251         * gnulib/import/strerror-override.c: Update.
2252         * gnulib/import/strerror-override.h: Update.
2253         * gnulib/import/strerror.c: Update.
2254         * gnulib/import/string.in.h: Update.
2255         * gnulib/import/stripslash.c: Update.
2256         * gnulib/import/strnlen1.c: Update.
2257         * gnulib/import/strnlen1.h: Update.
2258         * gnulib/import/strstr.c: Update.
2259         * gnulib/import/strtok_r.c: Update.
2260         * gnulib/import/sys_stat.in.h: Update.
2261         * gnulib/import/sys_time.in.h: Update.
2262         * gnulib/import/sys_types.in.h: Update.
2263         * gnulib/import/tempname.c: Update.
2264         * gnulib/import/tempname.h: Update.
2265         * gnulib/import/time.in.h: Update.
2266         * gnulib/import/unistd--.h: Update.
2267         * gnulib/import/unistd-safer.h: Update.
2268         * gnulib/import/unistd.in.h: Update.
2269         * gnulib/import/unsetenv.c: Update.
2270         * gnulib/import/verify.h: Update.
2271         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2272         * gnulib/import/wchar.in.h: Update.
2273         * gnulib/import/wctype.in.h: Update.
2274         * gnulib/import/xalloc-oversized.h: Update.
2275         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2276         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2277
2278 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2279
2280         * record-btrace.c (get_thread_current_frame): Remove
2281         old_inferior_ptid.
2282
2283 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2284
2285         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2286         with check_tag to 1 if and only if the type is tagged and the
2287         component being searched cannot been found in the current
2288         view. Otherwise, always call ada_to_fixed_type with
2289         check_tag to 0.
2290
2291 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2292
2293         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2294         declaration.
2295         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2296         * ada-varobj.c (ada_varobj_get_number_of_children,
2297         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2298
2299 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2300
2301         * ada-valprint.c (ada_value_print): Use type instead of
2302         enclosing type.
2303
2304 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2305
2306         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2307         an array of access to unconstrained array.
2308
2309 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2310
2311         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2312         (ada_check_typedef): Use it.
2313
2314 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2315
2316         * ada-varobj.c (ada_varobj_describe_struct_child)
2317         (ada_varobj_describe_child): Handle union case like struct one.
2318
2319 2018-09-10  Tom Tromey  <tom@tromey.com>
2320
2321         PR python/18380:
2322         * python/python.c (_initialize_python): Make example in "python"
2323         help work in Python 3.
2324
2325 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2326
2327         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2328         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2329         $(EXEEXT) to the script, as it is not a program.
2330
2331 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2332
2333         * python/py-prettyprint.c (pretty_print_one_value): Return
2334         gdbpy_ref<>.
2335         (print_string_repr): Adjust.
2336         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2337         * python/python-internal.h (apply_varobj_pretty_printer): Return
2338         gdbpy_ref<>.
2339         * varobj.c (varobj_value_get_print_value): Adjust.
2340
2341 2018-09-08  Tom Tromey  <tom@tromey.com>
2342
2343         PR python/16047:
2344         * python/py-prettyprint.c (pretty_print_one_value): Check for
2345         to_string method.
2346
2347 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2348
2349         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2350         replace_operator_with_call.
2351
2352 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2353
2354         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2355
2356 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2357
2358         * ada-typeprint.c (print_range): Print the bounds using TYPE
2359         rather than its TYPE_TARGET_TYPE.
2360
2361 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2362
2363         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2364         call to ada_to_fixed_value_create.
2365
2366 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2367
2368         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2369
2370 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2371
2372         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2373         by calls to error.
2374
2375 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2376
2377         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2378         Move update of loop variable "fi".
2379
2380 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2381
2382         * ada-lang.c (value_assign_to_component): In the case of
2383         big-endian targets, extract the bits of the given VAL
2384         using an src_offset of zero if container is not a scalar.
2385
2386 2018-09-06  Simon Ser  <contact@emersion.fr>
2387
2388         PR gdb/23105
2389         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2390         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2391         * fbsd-tdep.c (fbsd_make_note_desc): New.
2392         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2393         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2394         * target.h (enum target_object) Add FreeBSD-specific
2395         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2396
2397 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2398
2399         * compile/compile-c.h (generate_c_for_variable_locations):
2400         Change reference to pointer.
2401         * compile/compile-c-support.c (compile_program) <compute>:
2402         Likewise.
2403         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2404         (generate_c_for_for_one_variable): Likewise
2405         (generate_c_for_variable_locations): Likewise
2406         * compile/compile-c-types.c (compile_c_instance::convert_type):
2407         Likewise
2408         * compile/compile-cplus-symbols.c (convert_one_symbol):
2409         std::move the scope passed to enter_scope.
2410         * compile/compile-cplus-types.c
2411         (compile_cplus_instance::enter_scope): Make parameter
2412         rvalue-reference.
2413         (compile_cplus_instance::new_scope): Change reference to
2414         pointer.
2415         (compile_cplus_instance::convert_type): Likewise
2416         (compile_cplus_convert_typedef): std::move the scope passed to
2417         enter_scope.
2418         (compile_cplus_convert_struct_or_union): Likewise.
2419         (compile_cplus_convert_enum): Likewise.
2420         (compile_cplus_convert_namespace): Likewise.
2421         * compile/compile-cplus.h (compile_cplus_instance)
2422         <enter_scope>: Make parameter rvalue-reference.
2423         * compile/compile-internal.h (compile_instance)
2424         <get_cached_type>: Likewise
2425         * compile/compile-loc2c.c (push): Likewise
2426         (pushf): Likewise
2427         (unary): Likewise
2428         (binary): Likewise
2429         (print_label): Likewise
2430         (pushf_register_address): Likewise
2431         (pushf_register): Likewise
2432         (do_compile_dwarf_expr_to_c): Likewise
2433         (compile_dwarf_expr_to_c): Likewise
2434         (compile_dwarf_bounds_to_c): Likewise
2435         * compile/compile.c (compile_instance::get_cached_type):
2436         Likewise
2437         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2438         (compile_dwarf_bounds_to_c): Likewise
2439         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2440         (dwarf2_compile_property_to_c): Likewise
2441         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2442         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2443         Likewise
2444
2445 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2446
2447         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2448         * tui/tui-data.c (init_content_element): Don't initialize it.
2449
2450 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2451
2452         * tui/tui-data.h (struct tui_win_info)
2453         <detail::opaque>: Remove.
2454         * tui/tui-data.c (init_win_info): Remove assignment.
2455
2456 2018-09-05  Tom Tromey  <tom@tromey.com>
2457
2458         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2459         -Wformat-nonliteral.
2460         * target-float.c (host_float_ops<T>::to_string)
2461         (host_float_ops<T>::from_string): Use
2462         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2463         * configure: Rebuild.
2464
2465 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2466
2467         * printcmd.c (printf_c_string): Use
2468         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2469         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2470
2471 2018-09-05  Tom Tromey  <tom@tromey.com>
2472
2473         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2474
2475 2018-09-05  Tom de Vries  <tdevries@suse.de>
2476
2477         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2478         with resolve_abstract_p == true.
2479         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2480         defaulting to false. Propagate resolve_abstract_p to
2481         dwarf2_fetch_die_loc_sect_off.
2482         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2483         parameter, defaulting to false.
2484         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2485         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2486         parameter.
2487         * dwarf2read.h (struct die_info): Forward-declare.
2488         (die_info_ptr): New typedef.
2489         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2490
2491 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2492
2493         GDB 8.2 released.
2494
2495 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2496             Pedro Alves  <palves@redhat.com>
2497
2498         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2499         "aclocal-m4-deps.mk".  Include file here.
2500         $(srcdir)/aclocal.m4: Add "configure.ac".
2501         * gnulib/aclocal-m4-deps.mk: New file.
2502         * gnulib/update-gnulib.sh: Automatically update
2503         "aclocal-m4-deps.mk".
2504
2505 2018-09-04  Tom Tromey  <tom@tromey.com>
2506
2507         * configure: Rebuild.
2508         * configure.ac: Remove multi-ice code.
2509
2510 2018-09-04  Tom Tromey  <tom@tromey.com>
2511
2512         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2513         (ada-exp.o): Update.
2514
2515 2018-09-04  Tom Tromey  <tom@tromey.com>
2516
2517         * Makefile.in (printcmd.o, target-float.o): Remove.
2518         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2519
2520 2018-09-04  Tom Tromey  <tom@tromey.com>
2521
2522         * gnulib/Makefile.in: Remove obsolete comment.
2523         * Makefile.in: Remove obsolete comment.
2524
2525 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2526
2527         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2528         line with '+'.
2529
2530 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2531
2532         * riscv-tdep.c: Add 'prologue-value.h' include.
2533         (struct riscv_unwind_cache): New struct.
2534         (riscv_debug_unwinder): New global.
2535         (riscv_scan_prologue): Update arguments, capture register details
2536         from prologue scan.
2537         (riscv_skip_prologue): Reformat arguments line, move end of
2538         prologue calculation into riscv_scan_prologue.
2539         (riscv_frame_cache): Update return type, create
2540         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2541         details.
2542         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2543         (riscv_frame_prev_register): Use the trad_frame within the
2544         riscv_unwind_cache.
2545         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2546         flag.
2547
2548 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2549
2550         * trad-frame.h (trad_frame_set_realreg): Declare.
2551         (trad_frame_set_addr): Declare.
2552         * trad-frame.c (trad_frame_set_realreg): Define new function.
2553         (trad_frame_set_addr): Define new function.
2554         (trad_frame_set_reg_realreg): Use new function.
2555         (trad_frame_set_reg_addr): Use new function.
2556
2557 2018-09-01  Keith Seitz  <keiths@redhat.com>
2558
2559         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2560         pulongest instead of "%lld".
2561         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2562         ATTRIBUTE_UNUSED.
2563
2564 2018-08-31  Tom Tromey  <tom@tromey.com>
2565
2566         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2567         variant part type.
2568
2569 2018-08-31  Pedro Alves  <palves@redhat.com>
2570
2571         * gdbarch.h: Regenerate.
2572
2573 2018-08-31  Pedro Alves  <palves@redhat.com>
2574
2575         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2576         * target.h (Hardware watchpoint interfaces): Describe
2577         continuable/steppable/non-steppable watchpoints.
2578         * gdbarch.h, gdbarch.c: Regenerate.
2579
2580 2018-08-31  Pedro Alves  <palves@redhat.com>
2581
2582         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2583         Delete.
2584         * s390-linux-nat.c
2585         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2586         * target.h (target_ops::have_continuable_watchpoint): Delete.
2587         (target_have_continuable_watchpoint): Delete.
2588         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2589         * target-delegates.c: Regenerate.
2590
2591 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2592
2593         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2594         the files present in "gnulib/import/m4/".
2595
2596 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2597
2598         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2599         c.sw, c.swsp, and c.sdsp.
2600
2601 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2602
2603         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2604         (riscv_read_misa_reg): Don't cache value read into inferior data.
2605         (riscv_new_inferior_data): Delete.
2606         (riscv_inferior_data_cleanup): Delete.
2607         (riscv_inferior_data): Delete.
2608         (riscv_invalidate_inferior_data): Delete.
2609         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2610
2611 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2612
2613         * compile/compile-cplus-types.c
2614         (compile_cplus_instance::leave_scope): Take the address of scope
2615         object.
2616         (compile_cplus_instance::convert_qualified_base): Compare quals
2617         to 0.
2618
2619 2018-08-30  Keith Seitz  <keiths@redhat.com>
2620
2621         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2622         Use "%s" and host_address_to_string instead of "%p" in printf.
2623
2624 2018-08-29  Keith Seitz  <keiths@redhat.com>
2625
2626         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2627         and compile-cplus-types.c.
2628         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2629         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2630         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2631         Declare.
2632         * compile/compile-c-support.c: Include compile-cplus.h.
2633         (load_libcompile): Templatize.
2634         (get_compile_context): "New" function.
2635         (c_get_compile_context): Use get_compile_context.
2636         (cplus_get_compile_context): New function.
2637         (cplus_push_user_expression, cplus_pop_user_expression)
2638         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2639         (cplus_compute_program): Define new structs/functions.
2640         * compile/compile-cplus-symmbols.c: New file.
2641         * compile/compile-cplus-types.c: New file.
2642         * compile/compile-cplus.h: New file.
2643         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2644         Declare.
2645         * compile/compile-object-load.c (get_out_value_type): Use
2646         strncmp_iw when comparing symbol names.
2647         (compile_object_load): Add mst_bss and mst_data.
2648         * compile/compile.c (_initialize_compile): Remove
2649         -Wno-implicit-function-declaration from `compile_args'.
2650         * compile/gcc-cp-plugin.h: New file.
2651         * NEWS: Mention C++ compile support and new debug options.
2652
2653 2018-08-29  Keith Seitz  <keiths@redhat.com>
2654
2655         * linespec.c (collect_info::add_symbol): Make virtual.
2656         (struct symbol_searcher_collect_info): New struct.
2657         (symbol_searcher::find_all_symbols): New method.
2658         * symtab.h (class symbol_searcher): New class.
2659
2660 2018-08-29  Keith Seitz  <keiths@redhat.com>
2661
2662         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2663         Change to vector of block_symbol.  Update all users.
2664         (struct collect_info) <symbols>: Likewise.
2665         (collect_info::add_symbol): Take block_symbol as argument.
2666         Update all callers.
2667         (decode_compound_collector) <m_symbols>: Change type to vector
2668         of block_symbol.  Update all users.
2669         (decode_compound_collector::operator ()): Change parameter type
2670         to block_symbol.
2671         (find_method, find_function_symbols, find_linespec_symbols)
2672         (find_label_symbols_in_block, find_label_symbols): Change symbol
2673         vectors to block_symbol vectors.
2674         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2675         block_symbol.
2676
2677 2018-08-29  Keith Seitz  <keiths@redhat.com>
2678
2679         * linespec.c (symbolp): Remove typedef and VEC definitions.
2680         (bound_minimal_symbol_d): Likewise.
2681
2682 2018-08-29  Keith Seitz  <keiths@redhat.com>
2683
2684         * linespec.c (decode_compound_collector::decode_compound_collector):
2685         Remove initialization for `m_symtabs'.
2686         (decode_compound_collector::release_symbols): Change return type
2687         to std::vector.  Update all callers.
2688         (class decode_compound_collector) <m_symbols>: Change type to
2689         std::vector.
2690         (lookup_prefix_sym): Change return type to std::vector.  Update all
2691         callers.
2692         (compare_symbols): Remove.
2693         (std_compare_symbols): Rename to `compare_symbols'.
2694         (find_method): Change `sym_classes' parameter to std::vector.
2695         Update all callers.  Use std::sort to sort sym_classes.
2696         (find_linespec_symbols): Remove cleanup.
2697
2698 2018-08-29  Keith Seitz  <keiths@redhat.com>
2699
2700         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2701         std::vector.  Update all users.
2702         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2703         (struct collect_info) <minimal_symbols>: Likewise.
2704         (compare_msymbols): Return bool.  Change parameters to const
2705         bound_minimal_symbol references.
2706         (find_method, find_function_symbols, find_linespec_symbols): Change
2707         `minsyms' parameter to std::vector.  Update all callers.
2708
2709 2018-08-29  Keith Seitz  <keiths@redhat.com>
2710
2711         * linespec.c (struct linespec) <label_symbols>: Change type to
2712         std::vector.  Update all users.
2713         (find_label_symbols_in_block): Change `result' parameter to
2714         std::vector.  Update all callers.
2715         (find_label_symbols): Return std::vector.  Update all callers.
2716
2717 2018-08-29  Keith Seitz  <keiths@redhat.com>
2718
2719         * linespec.c (struct linespec) <function_symbols>: Change type to
2720         std::vector.  Update all users.
2721         (struct collect_info) <function_symbols>: Likewise.
2722         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2723         (std_compare_symbols): New function.
2724         (find_method, find_function_symbols, find_linespec_symbols)
2725         (find_label_symbols_in_block): Change `symbols' parameter to
2726         std::vector.  Update all callers.
2727         (find_label_symbols): Likewise for `function_symbols' and
2728         `label_funcs_ret'.
2729
2730 2018-08-29  Keith Seitz  <keiths@redhat.com>
2731
2732         * linespec.c (symtab_vector_up): Define.
2733         (struct linespec) <file_symtabs>: Change type to std::vector *.
2734         Update all uses.
2735         (struct collect_info) <file_symtabs>: Likewise.
2736         (collect_symtabs_from_filename): Return symtab_vector_up.
2737         Update all callers.
2738         (decode_objc): Remove cleanup.
2739         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2740         (symtab_collector::release_symtabs): Return symtab_vector_up.
2741         Update all callers.
2742         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2743         Update all users.
2744         (collect_symtabs_from_filename, symtabs_from_filename): Return
2745         symtab_vector_up.  Update all callers.
2746
2747 2018-08-29  Tom Tromey  <tom@tromey.com>
2748
2749         * csky-tdep.c (csky_analyze_prologue): Use
2750         core_addr_to_string_nz.
2751
2752 2018-08-29  Tom Tromey  <tom@tromey.com>
2753
2754         * windows-nat.c (struct xlate_exception) <them>: Change type to
2755         DWORD.
2756         (xlate): Fix formatting.  Remove last entry.
2757         (struct xlate_exception, xlate): Comment out.
2758         (windows_nat_target::resume): Use ranged for.
2759
2760 2018-08-29  Jim Wilson  <jimw@sifive.com>
2761
2762         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2763         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2764         of NT_PRFPREG.
2765         (riscv_linux_nat_target::store_registers): Likewise.
2766
2767 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2768
2769         PR gdb/23555
2770         PR gdb/23558
2771         * gnulib/aclocal.m4: Regenerate.
2772         * gnulib/config.in: Regenerate.
2773         * gnulib/configure: Regenerate.
2774         * gnulib/import/Makefile.am: Update.
2775         * gnulib/import/Makefile.in: Update.
2776         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2777         * gnulib/import/_Noreturn.h: ... this.
2778         * gnulib/import/alloca.in.h: Update.
2779         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2780         * gnulib/import/arg-nonnull.h: ... this.
2781         * gnulib/import/assure.h: Update.
2782         * gnulib/import/at-func.c: Update.
2783         * gnulib/import/basename-lgpl.c: Update.
2784         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2785         * gnulib/import/c++defs.h: ... this.
2786         * gnulib/import/canonicalize-lgpl.c: Update.
2787         * gnulib/import/cdefs.h: Update.
2788         * gnulib/import/chdir-long.c: Update.
2789         * gnulib/import/chdir-long.h: Update.
2790         * gnulib/import/cloexec.c: Update.
2791         * gnulib/import/cloexec.h: Update.
2792         * gnulib/import/close.c: Update.
2793         * gnulib/import/closedir.c: Update.
2794         * gnulib/import/config.charset: Update.
2795         * gnulib/import/dirent-private.h: Update.
2796         * gnulib/import/dirent.in.h: Update.
2797         * gnulib/import/dirfd.c: Update.
2798         * gnulib/import/dirname-lgpl.c: Update.
2799         * gnulib/import/dirname.h: Update.
2800         * gnulib/import/dosname.h: Update.
2801         * gnulib/import/dup-safer-flag.c: Update.
2802         * gnulib/import/dup-safer.c: Update.
2803         * gnulib/import/dup.c: Update.
2804         * gnulib/import/dup2.c: Update.
2805         * gnulib/import/errno.in.h: Update.
2806         * gnulib/import/error.c: Update.
2807         * gnulib/import/error.h: Update.
2808         * gnulib/import/exitfail.c: Update.
2809         * gnulib/import/exitfail.h: Update.
2810         * gnulib/import/extra/update-copyright: Update.
2811         * gnulib/import/fchdir.c: Update.
2812         * gnulib/import/fcntl.c: Update.
2813         * gnulib/import/fcntl.in.h: Update.
2814         * gnulib/import/fd-hook.c: Update.
2815         * gnulib/import/fd-hook.h: Update.
2816         * gnulib/import/fd-safer-flag.c: Update.
2817         * gnulib/import/fd-safer.c: Update.
2818         * gnulib/import/fdopendir.c: Update.
2819         * gnulib/import/filename.h: Update.
2820         * gnulib/import/filenamecat-lgpl.c: Update.
2821         * gnulib/import/filenamecat.h: Update.
2822         * gnulib/import/flexmember.h: Update.
2823         * gnulib/import/float+.h: Update.
2824         * gnulib/import/float.c: Update.
2825         * gnulib/import/float.in.h: Update.
2826         * gnulib/import/fnmatch.c: Update.
2827         * gnulib/import/fnmatch.in.h: Update.
2828         * gnulib/import/fnmatch_loop.c: Update.
2829         * gnulib/import/fpucw.h: Update.
2830         * gnulib/import/frexp.c: Update.
2831         * gnulib/import/frexpl.c: Update.
2832         * gnulib/import/fstat.c: Update.
2833         * gnulib/import/fstatat.c: Update.
2834         * gnulib/import/getcwd-lgpl.c: Update.
2835         * gnulib/import/getcwd.c: Update.
2836         * gnulib/import/getdtablesize.c: Update.
2837         * gnulib/import/getlogin_r.c: Update.
2838         * gnulib/import/getprogname.c: Update.
2839         * gnulib/import/getprogname.h: Update.
2840         * gnulib/import/gettext.h: Update.
2841         * gnulib/import/gettimeofday.c: Update.
2842         * gnulib/import/glob-libc.h: Update.
2843         * gnulib/import/glob.c: Update.
2844         * gnulib/import/glob.in.h: Update.
2845         * gnulib/import/glob_internal.h: Update.
2846         * gnulib/import/glob_pattern_p.c: Update.
2847         * gnulib/import/globfree.c: Update.
2848         * gnulib/import/hard-locale.c: Update.
2849         * gnulib/import/hard-locale.h: Update.
2850         * gnulib/import/intprops.h: Update.
2851         * gnulib/import/inttypes.in.h: Update.
2852         * gnulib/import/isnan.c: Update.
2853         * gnulib/import/isnand-nolibm.h: Update.
2854         * gnulib/import/isnand.c: Update.
2855         * gnulib/import/isnanl-nolibm.h: Update.
2856         * gnulib/import/isnanl.c: Update.
2857         * gnulib/import/itold.c: Update.
2858         * gnulib/import/libc-config.h: Update.
2859         * gnulib/import/limits.in.h: Update.
2860         * gnulib/import/localcharset.c: Update.
2861         * gnulib/import/localcharset.h: Update.
2862         * gnulib/import/localtime-buffer.c: Update.
2863         * gnulib/import/localtime-buffer.h: Update.
2864         * gnulib/import/lstat.c: Update.
2865         * gnulib/import/m4/00gnulib.m4: Update.
2866         * gnulib/import/m4/__inline.m4: Update.
2867         * gnulib/import/m4/absolute-header.m4: Update.
2868         * gnulib/import/m4/alloca.m4: Update.
2869         * gnulib/import/m4/builtin-expect.m4: Update.
2870         * gnulib/import/m4/canonicalize.m4: Update.
2871         * gnulib/import/m4/chdir-long.m4: Update.
2872         * gnulib/import/m4/close.m4: Update.
2873         * gnulib/import/m4/closedir.m4: Update.
2874         * gnulib/import/m4/configmake.m4: Update.
2875         * gnulib/import/m4/d-ino.m4: Update.
2876         * gnulib/import/m4/d-type.m4: Update.
2877         * gnulib/import/m4/dirent_h.m4: Update.
2878         * gnulib/import/m4/dirfd.m4: Update.
2879         * gnulib/import/m4/dirname.m4: Update.
2880         * gnulib/import/m4/double-slash-root.m4: Update.
2881         * gnulib/import/m4/dup.m4: Update.
2882         * gnulib/import/m4/dup2.m4: Update.
2883         * gnulib/import/m4/eealloc.m4: Update.
2884         * gnulib/import/m4/environ.m4: Update.
2885         * gnulib/import/m4/errno_h.m4: Update.
2886         * gnulib/import/m4/error.m4: Update.
2887         * gnulib/import/m4/exponentd.m4: Update.
2888         * gnulib/import/m4/exponentl.m4: Update.
2889         * gnulib/import/m4/extensions.m4: Update.
2890         * gnulib/import/m4/extern-inline.m4: Update.
2891         * gnulib/import/m4/fchdir.m4: Update.
2892         * gnulib/import/m4/fcntl-o.m4: Update.
2893         * gnulib/import/m4/fcntl.m4: Update.
2894         * gnulib/import/m4/fcntl_h.m4: Update.
2895         * gnulib/import/m4/fdopendir.m4: Update.
2896         * gnulib/import/m4/filenamecat.m4: Update.
2897         * gnulib/import/m4/flexmember.m4: Update.
2898         * gnulib/import/m4/float_h.m4: Update.
2899         * gnulib/import/m4/fnmatch.m4: Update.
2900         * gnulib/import/m4/fnmatch_h.m4: Update.
2901         * gnulib/import/m4/fpieee.m4: Update.
2902         * gnulib/import/m4/frexp.m4: Update.
2903         * gnulib/import/m4/frexpl.m4: Update.
2904         * gnulib/import/m4/fstat.m4: Update.
2905         * gnulib/import/m4/fstatat.m4: Update.
2906         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2907         * gnulib/import/m4/getcwd-path-max.m4: Update.
2908         * gnulib/import/m4/getcwd.m4: Update.
2909         * gnulib/import/m4/getdtablesize.m4: Update.
2910         * gnulib/import/m4/getlogin.m4: Update.
2911         * gnulib/import/m4/getlogin_r.m4: Update.
2912         * gnulib/import/m4/getpagesize.m4: Update.
2913         * gnulib/import/m4/getprogname.m4: Update.
2914         * gnulib/import/m4/gettimeofday.m4: Update.
2915         * gnulib/import/m4/glibc21.m4: Update.
2916         * gnulib/import/m4/glob.m4: Update.
2917         * gnulib/import/m4/glob_h.m4: Update.
2918         * gnulib/import/m4/gnulib-cache.m4: Update.
2919         * gnulib/import/m4/gnulib-common.m4: Update.
2920         * gnulib/import/m4/gnulib-comp.m4: Update.
2921         * gnulib/import/m4/gnulib-tool.m4: Update.
2922         * gnulib/import/m4/hard-locale.m4: Update.
2923         * gnulib/import/m4/include_next.m4: Update.
2924         * gnulib/import/m4/inttypes-pri.m4: Update.
2925         * gnulib/import/m4/inttypes.m4: Update.
2926         * gnulib/import/m4/isnand.m4: Update.
2927         * gnulib/import/m4/isnanl.m4: Update.
2928         * gnulib/import/m4/largefile.m4: Update.
2929         * gnulib/import/m4/limits-h.m4: Update.
2930         * gnulib/import/m4/localcharset.m4: Update.
2931         * gnulib/import/m4/locale-fr.m4: Update.
2932         * gnulib/import/m4/locale-ja.m4: Update.
2933         * gnulib/import/m4/locale-zh.m4: Update.
2934         * gnulib/import/m4/localtime-buffer.m4: Update.
2935         * gnulib/import/m4/longlong.m4: Update.
2936         * gnulib/import/m4/lstat.m4: Update.
2937         * gnulib/import/m4/malloc.m4: Update.
2938         * gnulib/import/m4/malloca.m4: Update.
2939         * gnulib/import/m4/math_h.m4: Update.
2940         * gnulib/import/m4/mbrtowc.m4: Update.
2941         * gnulib/import/m4/mbsinit.m4: Update.
2942         * gnulib/import/m4/mbsrtowcs.m4: Update.
2943         * gnulib/import/m4/mbstate_t.m4: Update.
2944         * gnulib/import/m4/memchr.m4: Update.
2945         * gnulib/import/m4/memmem.m4: Update.
2946         * gnulib/import/m4/mempcpy.m4: Update.
2947         * gnulib/import/m4/memrchr.m4: Update.
2948         * gnulib/import/m4/mkdir.m4: Update.
2949         * gnulib/import/m4/mkstemp.m4: Update.
2950         * gnulib/import/m4/mmap-anon.m4: Update.
2951         * gnulib/import/m4/mode_t.m4: Update.
2952         * gnulib/import/m4/msvc-inval.m4: Update.
2953         * gnulib/import/m4/msvc-nothrow.m4: Update.
2954         * gnulib/import/m4/multiarch.m4: Update.
2955         * gnulib/import/m4/nocrash.m4: Update.
2956         * gnulib/import/m4/off_t.m4: Update.
2957         * gnulib/import/m4/onceonly.m4: Update.
2958         * gnulib/import/m4/open-cloexec.m4: Update.
2959         * gnulib/import/m4/open.m4: Update.
2960         * gnulib/import/m4/openat.m4: Update.
2961         * gnulib/import/m4/opendir.m4: Update.
2962         * gnulib/import/m4/pathmax.m4: Update.
2963         * gnulib/import/m4/rawmemchr.m4: Update.
2964         * gnulib/import/m4/readdir.m4: Update.
2965         * gnulib/import/m4/readlink.m4: Update.
2966         * gnulib/import/m4/realloc.m4: Update.
2967         * gnulib/import/m4/rename.m4: Update.
2968         * gnulib/import/m4/rewinddir.m4: Update.
2969         * gnulib/import/m4/rmdir.m4: Update.
2970         * gnulib/import/m4/save-cwd.m4: Update.
2971         * gnulib/import/m4/secure_getenv.m4: Update.
2972         * gnulib/import/m4/setenv.m4: Update.
2973         * gnulib/import/m4/signal_h.m4: Update.
2974         * gnulib/import/m4/ssize_t.m4: Update.
2975         * gnulib/import/m4/stat-time.m4: Update.
2976         * gnulib/import/m4/stat.m4: Update.
2977         * gnulib/import/m4/std-gnu11.m4: Update.
2978         * gnulib/import/m4/stdbool.m4: Update.
2979         * gnulib/import/m4/stddef_h.m4: Update.
2980         * gnulib/import/m4/stdint.m4: Update.
2981         * gnulib/import/m4/stdio_h.m4: Update.
2982         * gnulib/import/m4/stdlib_h.m4: Update.
2983         * gnulib/import/m4/strchrnul.m4: Update.
2984         * gnulib/import/m4/strdup.m4: Update.
2985         * gnulib/import/m4/strerror.m4: Update.
2986         * gnulib/import/m4/string_h.m4: Update.
2987         * gnulib/import/m4/strstr.m4: Update.
2988         * gnulib/import/m4/strtok_r.m4: Update.
2989         * gnulib/import/m4/sys_socket_h.m4: Update.
2990         * gnulib/import/m4/sys_stat_h.m4: Update.
2991         * gnulib/import/m4/sys_time_h.m4: Update.
2992         * gnulib/import/m4/sys_types_h.m4: Update.
2993         * gnulib/import/m4/tempname.m4: Update.
2994         * gnulib/import/m4/time_h.m4: Update.
2995         * gnulib/import/m4/unistd-safer.m4: Update.
2996         * gnulib/import/m4/unistd_h.m4: Update.
2997         * gnulib/import/m4/warn-on-use.m4: Update.
2998         * gnulib/import/m4/wchar_h.m4: Update.
2999         * gnulib/import/m4/wchar_t.m4: Update.
3000         * gnulib/import/m4/wctype_h.m4: Update.
3001         * gnulib/import/m4/wint_t.m4: Update.
3002         * gnulib/import/malloc.c: Update.
3003         * gnulib/import/malloc/scratch_buffer.h: Update.
3004         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3005         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3006         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3007         * gnulib/import/malloca.c: Update.
3008         * gnulib/import/malloca.h: Update.
3009         * gnulib/import/malloca.valgrind: Update.
3010         * gnulib/import/math.in.h: Update.
3011         * gnulib/import/mbrtowc.c: Update.
3012         * gnulib/import/mbsinit.c: Update.
3013         * gnulib/import/mbsrtowcs-impl.h: Update.
3014         * gnulib/import/mbsrtowcs-state.c: Update.
3015         * gnulib/import/mbsrtowcs.c: Update.
3016         * gnulib/import/memchr.c: Update.
3017         * gnulib/import/memmem.c: Update.
3018         * gnulib/import/mempcpy.c: Update.
3019         * gnulib/import/memrchr.c: Update.
3020         * gnulib/import/mkdir.c: Update.
3021         * gnulib/import/mkstemp.c: Update.
3022         * gnulib/import/msvc-inval.c: Update.
3023         * gnulib/import/msvc-inval.h: Update.
3024         * gnulib/import/msvc-nothrow.c: Update.
3025         * gnulib/import/msvc-nothrow.h: Update.
3026         * gnulib/import/open.c: Update.
3027         * gnulib/import/openat-die.c: Update.
3028         * gnulib/import/openat-priv.h: Update.
3029         * gnulib/import/openat-proc.c: Update.
3030         * gnulib/import/openat.c: Update.
3031         * gnulib/import/openat.h: Update.
3032         * gnulib/import/opendir.c: Update.
3033         * gnulib/import/pathmax.h: Update.
3034         * gnulib/import/pipe-safer.c: Update.
3035         * gnulib/import/rawmemchr.c: Update.
3036         * gnulib/import/readdir.c: Update.
3037         * gnulib/import/readlink.c: Update.
3038         * gnulib/import/realloc.c: Update.
3039         * gnulib/import/ref-add.sin: Update.
3040         * gnulib/import/ref-del.sin: Update.
3041         * gnulib/import/rename.c: Update.
3042         * gnulib/import/rewinddir.c: Update.
3043         * gnulib/import/rmdir.c: Update.
3044         * gnulib/import/same-inode.h: Update.
3045         * gnulib/import/save-cwd.c: Update.
3046         * gnulib/import/save-cwd.h: Update.
3047         * gnulib/import/scratch_buffer.h: Update.
3048         * gnulib/import/secure_getenv.c: Update.
3049         * gnulib/import/setenv.c: Update.
3050         * gnulib/import/signal.in.h: Update.
3051         * gnulib/import/stat-time.c: Update.
3052         * gnulib/import/stat-time.h: Update.
3053         * gnulib/import/stat-w32.c: Update.
3054         * gnulib/import/stat-w32.h: Update.
3055         * gnulib/import/stat.c: Update.
3056         * gnulib/import/stdbool.in.h: Update.
3057         * gnulib/import/stddef.in.h: Update.
3058         * gnulib/import/stdint.in.h: Update.
3059         * gnulib/import/stdio.in.h: Update.
3060         * gnulib/import/stdlib.in.h: Update.
3061         * gnulib/import/str-two-way.h: Update.
3062         * gnulib/import/strchrnul.c: Update.
3063         * gnulib/import/strdup.c: Update.
3064         * gnulib/import/streq.h: Update.
3065         * gnulib/import/strerror-override.c: Update.
3066         * gnulib/import/strerror-override.h: Update.
3067         * gnulib/import/strerror.c: Update.
3068         * gnulib/import/string.in.h: Update.
3069         * gnulib/import/stripslash.c: Update.
3070         * gnulib/import/strnlen1.c: Update.
3071         * gnulib/import/strnlen1.h: Update.
3072         * gnulib/import/strstr.c: Update.
3073         * gnulib/import/strtok_r.c: Update.
3074         * gnulib/import/sys_stat.in.h: Update.
3075         * gnulib/import/sys_time.in.h: Update.
3076         * gnulib/import/sys_types.in.h: Update.
3077         * gnulib/import/tempname.c: Update.
3078         * gnulib/import/tempname.h: Update.
3079         * gnulib/import/time.in.h: Update.
3080         * gnulib/import/unistd--.h: Update.
3081         * gnulib/import/unistd-safer.h: Update.
3082         * gnulib/import/unistd.in.h: Update.
3083         * gnulib/import/unsetenv.c: Update.
3084         * gnulib/import/verify.h: Update.
3085         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3086         * gnulib/import/wchar.in.h: Update.
3087         * gnulib/import/wctype.in.h: Update.
3088         * gnulib/import/xalloc-oversized.h: Update.
3089         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3090         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3091
3092 2018-08-16  Gary Benson <gbenson@redhat.com>
3093
3094         PR gdb/13000:
3095         * gdb/main.c (captured_main_1): Exit with nonzero status
3096         in batch mode if the last command to be executed failed.
3097         * NEWS: Mention the above.
3098
3099 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3100
3101         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3102         end of warning message.
3103
3104 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3105
3106         PR gdb/22943:
3107         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3108         (aarch64_extract_return_value): Use
3109         aapcs_is_vfp_call_or_return_candidate.
3110         (aarch64_return_in_memory): Likewise.
3111         (aarch64_store_return_value): Likewise.
3112
3113 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3114
3115         * aarch64-tdep.c
3116         (aapcs_is_vfp_call_or_return_candidate): Make static
3117         (pass_in_v_or_stack): Remove function.
3118         (pass_in_v_vfp_candidate): New function.
3119         (aarch64_push_dummy_call): Check for float register candidates.
3120
3121 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3122
3123         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3124         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3125         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3126
3127 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3128
3129         PR build/23399
3130         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3131         (struct ipa_sym_addresses): Rename to...
3132         (struct ipa_sym_addresses_common): ... this.
3133         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3134
3135 2018-08-28  Tom Tromey  <tom@tromey.com>
3136
3137         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3138         (token_fifo): Now a std::vector.
3139         (yylex, c_parse): Update.
3140         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3141         (token_fifo): Now a std::vector.
3142         (yylex, d_parse): Update.
3143         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3144         (token_fifo): Now a std::vector.
3145         (yylex, go_parse): Update.
3146
3147 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3148
3149         * parser-defs.h (struct type_stack) <elements>: Change type to
3150         std::vector<union type_stack_elt>.
3151         <depth, size>: Remove.
3152         * parse.c (parse_exp_in_context_1): Adjust.
3153         (type_stack_reserve): Remove.
3154         (check_type_stack_depth): Remove.
3155         (insert_into_type_stack): Adjust to std::vector.
3156         (insert_type): Likewise.
3157         (push_type): Likewise.
3158         (push_type_int): Likewise.
3159         (insert_type_address_space): Likewise.
3160         (pop_type): Likewise.
3161         (pop_type_int): Likewise.
3162         (pop_typelist): Likewise.
3163         (pop_type_stack): Likewise.
3164         (append_type_stack): Likewise.
3165         (push_type_stack): Likewise.
3166         (get_type_stack): Likewise.
3167         (type_stack_cleanup): Likewise.
3168         (push_typelist): Likewise.
3169         (follow_types): Likewise.
3170         (_initialize_parse): Likewise.
3171
3172 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3173
3174         * NEWS: Mention csky target.
3175
3176 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3177             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3178             Don Breazeal  <donb@codesourcery.com>
3179
3180         * csky-linux-tdep.c: New file.
3181         * csky-tdep.c: Likewise.
3182         * csky-tdep.h: Likewise.
3183         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3184         csky-tdep.o.
3185         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3186         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3187         * configure.tgt: Add csky support.
3188
3189 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3190
3191         * python/py-framefilter.c (py_print_frame): Print frame architecture
3192         when printing on an MI output.
3193
3194 2018-08-27  Tom Tromey  <tom@tromey.com>
3195
3196         PR build/23087:
3197         * configure: Rebuild.
3198         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3199
3200 2018-08-27  Tom Tromey  <tom@tromey.com>
3201
3202         * aarch64-linux-tdep.c
3203         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3204         casts to int.
3205
3206 2018-08-27  Tom Tromey  <tom@tromey.com>
3207
3208         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3209         unsigned.
3210         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3211         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3212         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3213         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3214         unsigned.
3215
3216 2018-08-27  Tom Tromey  <tom@tromey.com>
3217
3218         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3219         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3220
3221 2018-08-27  Tom Tromey  <tom@tromey.com>
3222
3223         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3224         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3225         ULONGEST_MAX.
3226         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3227         ULONGEST_MAX.
3228         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3229         ULONGEST_MAX.
3230         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3231         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3232         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3233         ULONGEST_MAX.
3234         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3235         (ppc64_linux_sigaction_tramp_frame)
3236         (ppc32_linux_sighandler_tramp_frame)
3237         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3238         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3239         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3240         * mn10300-linux-tdep.c (am33_linux_sigframe)
3241         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3242         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3243         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3244         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3245         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3246         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3247         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3248         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3249         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3250         * microblaze-linux-tdep.c
3251         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3252         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3253         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3254         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3255         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3256         * common/common-types.h (ULONGEST_MAX): New define.
3257         (CORE_ADDR_MAX): Fix formatting.
3258         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3259         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3260         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3261         (arm_linux_rt_sigreturn_tramp_frame)
3262         (arm_eabi_linux_sigreturn_tramp_frame)
3263         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3264         (thumb2_eabi_linux_sigreturn_tramp_frame)
3265         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3266         (arm_linux_restart_syscall_tramp_frame)
3267         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3268         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3269         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3270         ULONGEST_MAX.
3271         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3272
3273 2018-08-27  Tom Tromey  <tom@tromey.com>
3274
3275         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3276         CORE_ADDR_MAX.
3277         * mips-tdep.c (mips_deal_with_atomic_sequence)
3278         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3279         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3280         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3281         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3282         CORE_ADDR_MAX.
3283         * aarch64-tdep.c (aarch64_software_single_step): Use
3284         CORE_ADDR_MAX.
3285
3286 2018-08-27  Tom Tromey  <tom@tromey.com>
3287
3288         * linespec.c (complete_linespec_component): Add cast to "char".
3289         * completer.c (completion_tracker::build_completion_result): Add
3290         cast to "char".
3291
3292 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3293
3294         * solist.h (struct solist, struct target_so_ops): Fix
3295         indentation.
3296
3297 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3298
3299         * ada-tasks.c (ada_task_info_s): Remove typedef.
3300         (DEF_VEC_O(ada_task_info_s)): Remove.
3301         (struct ada_tasks_inferior_data): Initialize fields.
3302         <task_list>: Make an std::vector.
3303         (get_ada_tasks_inferior_data): Allocate with new.
3304         (ada_get_task_number): Adjust.
3305         (get_task_number_from_id): Likewise.
3306         (valid_task_id): Likewise.
3307         (ada_get_task_info_from_ptid): Likewise.
3308         (iterate_over_live_ada_tasks): Likewise.
3309         (add_ada_task): Likewise.
3310         (read_known_tasks): Likewise.
3311         (ada_build_task_list): Likewise.
3312         (print_ada_task_info): Likewise.
3313         (info_task): Likewise.
3314         (task_command_1): Likewise.
3315
3316 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3317
3318         * ada-lang.c (add_angle_brackets): Return std::string.
3319
3320 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3321
3322         * python/py-threadevent.c (py_get_event_thread): Initialize
3323         pythread.
3324
3325 2018-08-24  Pedro Alves  <palves@redhat.com>
3326
3327         * python/py-bpevent.c (create_breakpoint_event_object): Use
3328         copy-initialization.
3329         * python/py-continueevent.c (emit_continue_event): Use
3330         copy-initialization.
3331         * python/py-exitedevent.c (create_exited_event_object): Return a
3332         gdbpy_ref<>.
3333         (emit_exited_event): Use copy-initialization.
3334         * python/py-inferior.c (python_new_inferior)
3335         (python_inferior_deleted, add_thread_object): Use
3336         copy-initialization.
3337         * python/py-infevents.c (create_inferior_call_event_object)
3338         (create_register_changed_event_object)
3339         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3340         (emit_inferior_call_event, emit_memory_changed_event)
3341         (emit_register_changed_event): Use copy-initialization.
3342         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3343         Return a gdbpy_ref<>.
3344         (emit_new_objfile_event): Use copy-initialization.
3345         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3346         (emit_clear_objfiles_event): Use copy-initialization.
3347         * python/py-signalevent.c (create_signal_event_object): Use
3348         copy-initialization.
3349         * python/py-threadevent.c (create_thread_event_object): Use
3350         copy-initialization.
3351
3352 2018-08-24  Pedro Alves  <palves@redhat.com>
3353             Simon Marchi  <simon.marchi@ericsson.com>
3354
3355         PR gdb/23379
3356         * python/py-continueevent.c: Include "gdbthread.h".
3357         (create_continue_event_object): Add intro comment.  Add 'ptid'
3358         parameter.  Use it to find thread to pass to
3359         create_thread_event_object.
3360         (emit_continue_event): Pass PTID down to
3361         create_continue_event_object.
3362         * python/py-event.h (py_get_event_thread): Declare.
3363         (create_thread_event_object): Remove default from 'thread'
3364         parameter.
3365         * python/py-stopevent.c (create_stop_event_object): Use
3366         py_get_event_thread.
3367         * python/py-threadevent.c (get_event_thread): Rename to ...
3368         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3369         and use it to find the thread.
3370         (create_thread_event_object): Assert that THREAD isn't null.
3371         Don't find the event thread here.
3372
3373 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3374
3375         * block.h (blockrange, blockranges): New struct declarations.
3376         (struct block): Add new field named `ranges'.
3377         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3378         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3379         macros for accessing ranges in struct block.
3380         (make_blockranges): New declaration.
3381         block.c (make_blockranges): New function.
3382         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3383         for block.
3384         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3385         * blockframe.c (cache_pc_function_block): New static global.
3386         (clear_pc_function_cache): Clear cache_pc_function_block.
3387         (find_pc_partial_function): Move comment to symtab.h.  Add
3388         support for non-contiguous blocks.
3389         * cli/cli-cmds.c (block.h): Include.
3390         (print_disassembly): Handle printing of non-contiguous blocks.
3391         (disassemble_current_function): Likewise.
3392         (disassemble_command): Likewise.
3393
3394         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3395         BLOCK_START.
3396         * blockframe.c (get_pc_function_start): Likewise.
3397         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3398         (gcc_symbol_address): Likewise.
3399         * compile/compile-object-run.c (compile_object_run): Likewise.
3400         * compile/compile.c (get_expr_block_and_pc): Likewise.
3401         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3402         (func_addr_to_tail_call_list): Likewise.
3403         * findvar.c (default_read_var_value): Likewise.
3404         * inline-frame.c (inline_frame_this_id): Likewise.
3405         (skip-inline_frames): Likewise.
3406         * infcmd.c (until_next_command): Likewise.
3407         * linespec.c (convert_linespec_to_sals): Likewise.
3408         * parse.c (parse_exp_in_context_1): Likewise.
3409         * printcmd.c (build_address_symbolic): likewise.
3410         (info_address_command): Likewise.
3411         symtab.c (find_function_start_sal): Likewise.
3412         (skip_prologue_sal): Likewise.
3413         (find_function_alias_target): Likewise.
3414         (find_gnu_ifunc): Likewise.
3415         * stack.c (find_frame_funname): Likewise.
3416         * symtab.c (fixup_symbol_section): Likewise.
3417         (find_function_start_sal): Likewise.
3418         (skip_prologue_sal): Likewsie.
3419         (find_function_alias_target): Likewise.
3420         (find_gnu_ifunc): Likewise.
3421         * tracepoint.c (info_scope_command): Likewise.
3422         * value.c (value_fn_field): Likewise.
3423
3424         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3425         in place of find_pc_partial_function.
3426         * blockframe.c (find_function_entry_range_from_pc): New function.
3427         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3428         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3429         for each range in a block.
3430
3431
3432 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3433
3434         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3435         incrementation.
3436
3437 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3438
3439         * solib-svr4.c (read_program_headers_from_bfd): Return
3440         gdb::optional<gdb::byte_vector>.
3441         (svr4_exec_displacement): Adjust.
3442
3443 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3444
3445         * solib-svr4.c (read_program_header): Return
3446         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3447         (find_program_interpreter): Return
3448         gdb::optional<gdb::byte_vector>.
3449         (scan_dyntag_auxv): Adjust.
3450         (enable_break): Adjust.
3451         (svr4_exec_displacement): Adjust.
3452
3453 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3454
3455         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3456         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3457
3458 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3459
3460         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3461         string_vprintf.
3462         * guile/scm-utils.c (gdbscm_printf): Likewise.
3463         * serial.c (serial_printf): Likewise.
3464         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3465
3466 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3467
3468         * stack.c (print_frame): Print frame architecture when printing on
3469         an MI output.
3470         * NEWS: Mention new "arch" attribute in frame output.
3471
3472 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3473
3474         * arch/aarch64.h (aarch64_regnum): Update comment.
3475
3476 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3477
3478         * NEWS: Add SVE to 8.2 section.
3479
3480 2018-08-21  Pedro Alves  <palves@redhat.com>
3481
3482         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3483         out from gdbscm_parse_function_args.
3484         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3485         gdbscm_parse_function_args_1.
3486
3487 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3488
3489         PR gdb/17816
3490         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3491         operator.
3492
3493 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3494
3495         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3496
3497 2018-08-19  Michael Spang  <spang@google.com>
3498
3499         PR gdb/11786
3500         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3501         for PT_TLS segments.
3502
3503 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3504
3505         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3506         dwarf_variable_value.
3507         * dwarf2-frame.c (class dwarf_expr_executor):
3508         Add override for dwarf_variable_value.
3509         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3510         (class symbol_needs_eval_context): Likewise.
3511         (indirect_synthetic_pointer): Add forward declaration.
3512         (sect_variable_value): New function.
3513         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3514         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3515         for DW_OP_GNU_variable_value.
3516
3517 2018-08-16  Tom Tromey  <tom@tromey.com>
3518
3519         * top.c (read_command_file): Update.
3520         (command_line_input): Remove "repeat" argument.
3521         * ada-lang.c (get_selections): Update.
3522         * linespec.c (decode_line_2): Update.
3523         * defs.h (command_line_input): Remove argument.
3524         * cli/cli-script.c (read_next_line): Update.
3525         * python/py-gdb-readline.c: Update.
3526
3527 2018-08-17  Tom Tromey  <tom@tromey.com>
3528
3529         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3530         command_line_input.
3531
3532 2018-08-15  Tom Tromey  <tom@tromey.com>
3533
3534         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3535
3536 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3537
3538         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3539         If used, use find_pc_partial_function to find address range
3540         to disassemble.
3541         * mi/mi-main.c (mi_cmd_list_features): Report
3542         "data-disassemble-a-option" feature.
3543         * NEWS: Mention new -data-disassemble option -a.
3544
3545 2018-08-13  Tom Tromey  <tom@tromey.com>
3546
3547         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3548
3549 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3550
3551         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3552         (aarch64_linux_collect_sve_regset): Likewise.
3553         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3554         * regcache.h (regcache_map_entry_size): New function.
3555
3556 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3557
3558         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3559         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3560         (SVE_HEADER_VL_LENGTH): Likewise.
3561         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3562         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3563         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3564         (SVE_HEADER_SIZE_OFFSET): Likewise.
3565         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3566         (SVE_HEADER_VL_OFFSET): Likewise.
3567         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3568         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3569         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3570         (SVE_HEADER_SIZE): Likewise.
3571         (aarch64_linux_core_read_vq): Add function.
3572         (aarch64_linux_core_read_description): Check for SVE section.
3573
3574 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3575
3576         * aarch64-fbsd-tdep.c
3577         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3578         collect_size.
3579         * aarch64-linux-tdep.c
3580         (aarch64_linux_iterate_over_regset_sections): Likewise.
3581         * alpha-linux-tdep.c
3582         (alpha_linux_iterate_over_regset_sections):
3583         * alpha-nbsd-tdep.c
3584         (alphanbsd_iterate_over_regset_sections): Likewise.
3585         * amd64-fbsd-tdep.c
3586         (amd64fbsd_iterate_over_regset_sections): Likewise.
3587         * amd64-linux-tdep.c
3588         (amd64_linux_iterate_over_regset_sections): Likewise.
3589         * arm-bsd-tdep.c
3590         (armbsd_iterate_over_regset_sections): Likewise.
3591         * arm-fbsd-tdep.c
3592         (arm_fbsd_iterate_over_regset_sections): Likewise.
3593         * arm-linux-tdep.c
3594         (arm_linux_iterate_over_regset_sections): Likewise.
3595         * corelow.c (get_core_registers_cb): Likewise.
3596         (core_target::fetch_registers): Likewise.
3597         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3598         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3599         * gdbarch.h (void): Regenerate.
3600         * gdbarch.sh: Add supply_size and collect_size.
3601         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3602         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3603         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3604         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3605         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3606         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3607         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3608         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3609         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3610         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3611         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3612         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3613         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3614         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3615         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3616         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3617         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3618         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3619         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3620         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3621         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3622         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3623         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3624         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3625         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3626         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3627         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3628         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3629         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3630         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3631
3632 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3633
3634         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3635         with string_printf.
3636
3637 2018-08-10  Keith Seitz  <keiths@redhat.com>
3638
3639         * compile/compile-c-support.c (add_code_header, add_code_footer):
3640         Move into policy class.
3641         (c_push_user_expression, pop_user_expression_nop)
3642         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3643         (compile_program): New host class.
3644         (c_compile_program): New typedef.
3645         (c_compute_porgram): Use c_compile_program.
3646
3647 2018-08-10  Keith Seitz  <keiths@redhat.com>
3648
3649         * compile/compile-internal.h (compile_instance::~compile_instance):
3650         Remove calls to htab_delete.
3651         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3652         * compile.c (compile_instance::compile_instance): Initialize
3653         htab unique pointers.
3654         (compile_instance::get_cached_type, compile_instance::insert_type)
3655         (compile_instance::error_symbol_once): Update for unique_ptr.
3656
3657 2018-08-10  Keith Seitz  <keiths@redhat.com>
3658
3659         * compile/compile-c-symbols.c (struct symbol_error)
3660         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3661         (compile_instance::insert_symbol_error)
3662         (compile_instance::error_symbol_once): Move to ...
3663         * compile/compile.c: ... here.
3664
3665 2018-08-10  Keith Seitz  <keiths@redhat.com>
3666
3667         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3668         instead of `new_compile_instance'.
3669         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3670         Update description.
3671         If the symbol error map is not initialized, create it.
3672         (generate_c_for_for_one_symbol): Do not check/initialize
3673         the symbol error map.
3674         * compile/compile-c-types.c (compile_c_instance): Make a class.
3675         Update all callers.
3676         (compile_instance::compile_instance): Initialize the type cache.
3677         (get_cached_type): New function.
3678         (insert_type): Update description.
3679         (compile_c_instance::m_default_cflags): Define.
3680         (convert_type): Update description.  Use get_cached_type.
3681         (delete_instance): Moved to destructor.
3682         (new_compile_instance): Moved to constructor.
3683         * compile/compile-c.h (compile_c_instance): Make class inheriting
3684         from compile_instance.
3685         <base>: Remove field.
3686         <type_map, symbol_err_map>: Move to base class.
3687         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3688         * compile/compile-internal.h (compile_instance): Make class.
3689         <type_map_t, symbol_err_map_t>: Define.
3690         <fe>: Rename to `m_gcc_fe'.
3691         <scope, block, gcc_target_options>: Add `m_' prefix.
3692         <m_type_map, m_symbol_err_map>: New fields, moved from
3693         compile_c_instance.
3694         <destroy>: Remove.
3695         (convert_type, new_compile_instance): Remove.
3696         * compile/compile.c (cleanup_compile_instance): Remove.
3697         (compile_to_object): Use unique_ptr to eliminate cleanups.
3698         (compile_instance::set_print_callback, compile_instance::version)
3699         (compile_instance::set_verbose)
3700         (compile_instance::set_driver_filename)
3701         (compile_instance::set_triplet_regexp)
3702         (compile_instance::set_arguments)
3703         (compile_instance::set_source_file)
3704         (compile_instance::compile): Define.
3705
3706 2018-08-10  Keith Seitz  <keiths@redhat.com>
3707
3708         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3709         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3710         gcc-c-fe.def to define C plugin.
3711         (delete_instance): Delete `c_plugin'.
3712         (new_compile_instance): Initialize `c_plugin'.
3713         * compile/compile-c.h: Include gcc_c_plugin.h.
3714         (struct compile_c_instance) <c_plugin>: New member.
3715         * gcc-c-plugin.h: New file.
3716         Update all callers with API change.
3717
3718 2018-08-10  Keith Seitz  <keiths@redhat.com>
3719
3720         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3721         (HFILES_NO_SRCDIR): ... to here.
3722         Add compile-internal.h and compile-c.h.
3723         * compile/compile-c-support.c: Include compile-c.h.
3724         * compile/compile-c-symbols.c: Include compile-c.h.
3725         (generate_c_for_variable_locations): Update comment.
3726         * compile/compile-c-types.c: Include compile-c.h.
3727         * compile/compile-c.h: New file -- moved C language declarations
3728         from other files here.
3729         * compile/compile-internal.h: Do not include hashtab.h or
3730         common/enum-flags.h.
3731         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3732         (gcc_convert_symbol, gcc_symbol_address)
3733         (generate_c_for_variable_locations, c_get_mode_for_size)
3734         (c_get_range_decl_name): Definitions moved to compile-c.h.
3735         * compile/compile-loc2c.c: Include compile-c.h.
3736
3737 2018-08-10  Keith Seitz  <keiths@redhat.com>
3738
3739         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3740         (c_symbol_substitution_name): ... this.
3741         Update all callers.
3742
3743 2018-08-10  Keith Seitz  <keiths@redhat.com>
3744
3745         * compile/compile-c-support.c (c_compute_program): Use
3746         unique_xmalloc_ptr to eliminate cleanup.
3747         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3748         Return a unique_xmalloc_ptr and eliminate cleanup.
3749         * compile/compile-internal.h (generate_c_for_variable_locations):
3750         Return unique_xmalloc_ptr and update description.
3751
3752 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3753
3754         * corelow.c (core_target::get_core_register_section): Rename
3755         min_size to section_min_size.
3756
3757 2018-08-09  Jim Wilson  <jimw@sifive.com>
3758
3759         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3760         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3761         * NEWS: Mention new GNU/Linux RISC-V target.
3762         * configure.host: Add riscv*-*-linux*.
3763         * configure.nat: Add riscv*.
3764         * configure.tgt: Add riscv*-*-linux*.
3765         * riscv-linux-nat.c: New file.
3766         * riscv-linux-tdep.c: New file.
3767
3768 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3769
3770         * infrun.c (resume): Make static, add forward declaration.
3771         (proceed): Update header comment.
3772         * infrun.h (resume): Delete declaration.
3773
3774 2018-08-09  Tom Tromey  <tom@tromey.com>
3775
3776         * riscv-tdep.h: Minor formatting fixes.
3777
3778 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3779
3780         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3781         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3782         (test_mkdir_recursive): Likewise.
3783         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3784
3785 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3786
3787         * valarith.c (value_subscripted_rvalue): If an array is not in
3788         memory, and we don't know the upper bound, then we can't know that
3789         the requested element exists or not.
3790
3791 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3792
3793         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3794         (target_options_to_string): Add comment.
3795
3796 2018-08-08  Tom Tromey  <tom@tromey.com>
3797
3798         * unittests/scoped_mmap-selftests.c: Check result of "write".
3799
3800 2018-08-08  Jim Wilson  <jimw@sifive.com>
3801
3802         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3803         (decode_register_index_short): New.
3804         (decode_j_type_insn, decode_cj_type_insn): New.
3805         (decode_b_type_insn, decode_cb_type_insn): New.
3806         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3807         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3808         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3809         is_c_sw_insn instead of is_sw_insn.
3810         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3811         (riscv_software_single_step): New.
3812         * riscv-tdep.h (riscv_software_single_step): Declare.
3813
3814         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3815         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3816
3817 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3818
3819         PR gdb/18050:
3820         * target.c (dispose_inferior): Don't dispose of inferiors that are
3821         already killed.
3822
3823 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3824
3825         * remote.c (remote_target::download_tracepoint): Change char* to
3826         const char*.
3827
3828 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3829
3830         * target.h (target_options_to_string): Return an std::string.
3831         * target.c (str_comma_list_concat_elem): Return void, use
3832         std::string.
3833         (do_option): Likewise.
3834         (target_options_to_string): Return an std::string.
3835         * linux-nat.c (linux_nat_target::wait): Adjust.
3836         * target-debug.h (target_debug_print_options): Adjust.
3837
3838 2018-08-07  Tom Tromey  <tom@tromey.com>
3839
3840         * Makefile.in (CPPFLAGS): New variable.
3841         (INTERNAL_CPPFLAGS): Use it.
3842
3843 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3844
3845         * NEWS: Mention the index cache.
3846
3847 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3848
3849         * common/pathstuff.h (get_standard_cache_dir): New.
3850         * common/pathstuff.c (get_standard_cache_dir): New.
3851         * build-id.h (build_id_to_string): New.
3852         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3853         DEBUG_STR_SUFFIX): Move to here.
3854         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3855         DEBUG_STR_SUFFIX): Move from there.
3856         (write_psymtabs_to_index): Make non-static, add basename
3857         parameter.  Write to temporary files, rename when done.
3858         (save_gdb_index_command): Adjust call to
3859         write_psymtabs_to_index.
3860         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3861         field.
3862         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3863         (get_gdb_index_contents_from_cache): New.
3864         (get_gdb_index_contents_from_cache_dwz): New.
3865         (dwarf2_initialize_objfile): Read index from cache.
3866         (dwarf2_build_psymtabs): Save to index.
3867         * dwarf-index-cache.h: New file.
3868         * dwarf-index-cache.c: New file.
3869         * dwarf-index-write.h: New file.
3870
3871 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3872
3873         * gnulib/aclocal.m4: Re-generate.
3874         * gnulib/config.in: Re-generate.
3875         * gnulib/configure: Re-generate.
3876         * gnulib/import/Makefile.am: Re-generate.
3877         * gnulib/import/Makefile.in: Re-generate.
3878         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3879         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3880         * gnulib/import/m4/mkdir.m4: New file.
3881         * gnulib/import/mkdir.c: New file.
3882         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3883         module.
3884
3885 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3886
3887         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3888         * common/scoped_mmap.c: New file.
3889         * common/scoped_mmap.h (destroy): New method.
3890         (~scoped_mmap, reset): Use destroy.
3891         (scoped_mmap): New move constructor.
3892         (mmap_file): New declaration.
3893         * unittests/scoped_mmap-selftests.c (test_normal,
3894         test_invalid_filename, run_tests): New functions.
3895         (_initialize_scoped_mmap_selftests): Register selftest.
3896
3897 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3898
3899         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3900         (read_gdb_index_from_buffer): ... this.  Remove section
3901         parameter, add buffer parameter.
3902         (get_gdb_index_contents_ftype,
3903         get_gdb_index_contents_dwz_ftype): New typedefs.
3904         (dwarf2_read_gdb_index): Add callback parameters to get the
3905         index contents.
3906         (get_gdb_index_contents_from_section): New.
3907         (dwarf2_initialize_objfile): Update call to
3908         dwarf2_read_gdb_index.
3909
3910 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3911
3912         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3913         (gdb_open_cloexec): Likewise.
3914         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3915         (commandline_from_pid): Likewise.
3916         (linux_xfer_osdata_threads): Likewise.
3917         (linux_xfer_osdata_fds): Likewise.
3918         * ada-lang.c (is_package_name): Likewise.
3919         * auxv.c (procfs_xfer_auxv): Likewise.
3920         * breakpoint.c (print_one_breakpoint_location): Use
3921         uiout::field_fmt.
3922         (print_one_catch_solib): Use string_printf.
3923         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3924         (add_pe_forwarded_sym): Likewise.
3925         * dwarf2read.c (create_type_unit_group): Likewise.
3926         (build_error_marker_type): Likewise.
3927         * infcall.c (get_function_name): Likewise.
3928         * valprint.c (print_converted_chars_to_obstack): Likewise.
3929         * xtensa-tdep.c (xtensa_register_type): Likewise.
3930
3931 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * remote.c (remote_target::download_tracepoint): Fix format
3934         string errors.
3935
3936 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3937
3938         * tracefile.c: Include common/byte-vector.h.
3939         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3940         with trace_regblock_size if needed.  Update uses of buf.
3941
3942 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3943
3944         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3945         std::vector<unsigned char>.
3946         * tracepoint.c (collection_list::collection_list): Remove
3947         m_regs_mask initializer from initializer list.  Resize
3948         m_regs_mask using the largest remote register number.
3949         (collection_list::add_remote_register): Remove size check on
3950         m_regs_mask.  Use at to access element.
3951         (collection_list::stringify): Change type of temp_buf to
3952         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3953         stringify the register mask.  Use pack_hex_byte for the register
3954         mask.
3955
3956 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3957
3958         * tracepoint.h (class collection_list) <add_register>: Remove.
3959         <add_remote_register, add_ax_registers, add_local_register>:
3960         Declare.
3961         <add_memrange>: Add scope parameter.
3962         * tracepoint.c (encode_actions_1): Likewise.
3963         (collection_list::add_register): Rename to ...
3964         (collection_list::add_remote_register): ... this.  Update
3965         comment.
3966         (collection_list::add_ax_registers, add_local_register): New
3967         methods.
3968         (collection_list::add_memrange): Add scope parameter.  Call
3969         add_local_register instead of add_register.
3970         (finalize_tracepoint_aexpr): New function.
3971         (collection_list::collect_symbol): Update calls to add_memrange.
3972         Call add_local_register instead of add_register.  Call
3973         add_ax_registers.  Call finalize_tracepoint_aexpr.
3974         (encode_actions_1): Get remote regnos for $reg action.  Call
3975         add_remote_register, add_ax_registers, and add_local_register.
3976         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3977         (validate_actionline): Call finalize_tracepoint_aexpr.
3978
3979 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3980
3981         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3982         Replace array buf with gdb::char_vector buf, of size
3983         get_remote_packet_size ().  Replace references to buf and
3984         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3985         and xsnprintf with snprintf.  Raise errors if the buffer is too
3986         small.
3987
3988 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3989
3990         * remote.c (remote_target::download_tracepoint): Fix the has_more
3991         predicate in the QTDP action list iteration.
3992
3993 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3994
3995         * remote.c (remote_target::download_tracepoint): Fix indentation
3996         in for block.
3997
3998 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3999
4000         * proc-api.c (_initialize_proc_api): Remove c, unused.
4001         * procfs.c (procfs_init_inferior): Remove signals, unused.
4002         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4003         unused.
4004
4005 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4006             Andrew Burgess  <andrew.burgess@embecosm.com>
4007
4008         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4009         'W_STOPCODE (0)' as this could be ambiguous.
4010
4011 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4012
4013         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4014         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4015         "ai_socktype").
4016
4017 2018-08-02  Tom Tromey  <tom@tromey.com>
4018
4019         PR symtab/16842.
4020         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4021         symbols.
4022         (process_structure_scope): Likewise.
4023
4024 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4025
4026         PR gdb/22629:
4027         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4028         kill inferior.
4029
4030 2018-08-02  Tom Tromey  <tom@tromey.com>
4031
4032         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4033         (darwin_suspend_inferior, darwin_resume_inferior)
4034         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4035         (darwin_check_new_threads): Check result of get_darwin_inferior.
4036
4037 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4038
4039         GDB 8.1.1 released.
4040
4041 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4042
4043         * varobj.c (varobj_get_path_expr_parent): Report an error if
4044         parent is a dynamic varobj.
4045
4046 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4047
4048         * gnulib/aclocal.m4: Re-generate.
4049         * gnulib/config.in: Re-generate.
4050         * gnulib/configure: Re-generate.
4051         * gnulib/import/Makefile.in: Re-generate.
4052         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4053         * gnulib/import/m4/onceonly.m4: Re-generate.
4054
4055 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4056
4057         * target-descriptions.c (struct xml_test_tdesc): New.
4058         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4059         (record_xml_tdesc): Update.
4060         (maintenance_check_xml_descriptions): Update.
4061         * target-descriptions.h (record_xml_tdesc): Update comment.
4062
4063 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4064
4065         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4066         checking array bounds are defined.
4067
4068 2018-07-30  Tom Tromey  <tom@tromey.com>
4069
4070         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4071         irreflexivity violation.
4072
4073 2018-07-30  Tom Tromey  <tom@tromey.com>
4074
4075         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4076         * value.c (unpack_long): Remove lint code.
4077         * valops.c (value_ind): Remove lint code.
4078         * valarith.c (value_x_binop, value_x_unop, value_equal)
4079         (value_pos): Remove lint code.
4080
4081 2018-07-28  Tom de Vries  <tdevries@suse.de>
4082
4083         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4084         with undefined upper bound as <optimized out>.
4085
4086 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4087
4088         * gcore.in: Rename variable "name" to "prefix".  Expand
4089         "usage" text.
4090
4091 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4092
4093         * windows-nat.c (windows_nat_target::create_inferior): Update to
4094         call close() in global namespace.
4095
4096 2018-07-26  Tom Tromey  <tom@tromey.com>
4097
4098         * dwarf-index-write.c (add_address_entry): Don't add objfile
4099         offsets.
4100         * dbxread.c (find_stab_function): Rename from
4101         find_stab_function_addr.  Return a bound_minimal_symbol.
4102         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4103         Don't add objfile offsets.
4104         (end_psymtab): Use raw_text_low, raw_text_high,
4105         MSYMBOL_VALUE_RAW_ADDRESS.
4106         (read_ofile_symtab): Update.
4107         (process_one_symbol): Update.
4108         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4109         offsets.
4110         (dw2_relocate): Remove.
4111         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4112         searching addrmap.
4113         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4114         Update.
4115         (process_psymtab_comp_unit_reader, add_partial_symbol)
4116         (add_partial_subprogram, dwarf2_ranges_read): Update.
4117         (load_partial_dies): Update.
4118         (add_address_entry): Don't add objfile offsets.
4119         (dwarf2_build_include_psymtabs): Update.
4120         (create_addrmap_from_aranges): Don't add objfile offsets.
4121         (dw2_find_pc_sect_compunit_symtab): Update.
4122         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4123         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4124         Update.
4125         (parse_partial_symbols): Don't add objfile offsets.  Use
4126         raw_text_low, raw_text_high.  Update.
4127         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4128         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4129         or call 'relocate' quick function.  Clear psymbol_map.
4130         * psympriv.h (struct partial_symbol) <address>: Add section
4131         offset.
4132         <set_unrelocated_address>: Rename from set_address.
4133         <raw_text_low, raw_text_high>: New methods.
4134         <text_low, text_high>: Add objfile parameter.
4135         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4136         set_unrelocated_address.
4137         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4138         (find_pc_psymbol): Update.
4139         (fixup_psymbol_section, relocate_psymtabs): Remove.
4140         (dump_psymtab, psym_functions): Update.
4141         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4142         parameter.
4143         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4144         (start_psymtab_common): Update.
4145         * symfile-debug.c (debug_qf_relocate): Remove.
4146         (debug_sym_quick_functions): Update.
4147         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4148         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4149         Update.
4150
4151 2018-07-26  Tom Tromey  <tromey@redhat.com>
4152
4153         * dbxread.c (end_psymtab): Use text_high_valid and
4154         text_low_valid.
4155         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4156         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4157         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4158         Update comment.
4159         <text_low_valid, text_high_valid>: New fields.
4160         <set_text_low, set_text_high>: Update.
4161         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4162
4163 2018-07-26  Tom Tromey  <tom@tromey.com>
4164
4165         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4166         Update.
4167         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4168         textlow and texthigh fields.
4169         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4170         Update.
4171         * mdebugread.c (parse_lines, parse_partial_symbols)
4172         (psymtab_to_symtab_1): Update.
4173         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4174         Rename fields.  Update comment.  Now private.
4175         <text_low, text_high, set_text_low, set_text_high>: New methods.
4176         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4177         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4178         (start_psymtab_common, maintenance_info_psymtabs)
4179         (maintenance_check_psymtabs): Update.
4180         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4181         texthigh fields.
4182         (scan_xcoff_symtab): Update.
4183
4184 2018-07-26  Tom Tromey  <tromey@redhat.com>
4185
4186         * psympriv.h (struct partial_symbol) <unrelocated_address,
4187         address, set_address>: New methods.
4188         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4189         (fixup_psymbol_section, relocate_psymtabs): Update.
4190         (print_partial_symbols): Add 'objfile' parameter.  Update.
4191         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4192         Update.
4193
4194 2018-07-26  Tom Tromey  <tom@tromey.com>
4195
4196         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4197         (debug_names::write_psymbols): Update.
4198         * psympriv.h (struct partial_symbol): Derive from
4199         general_symbol_info.
4200         <obj_section>: New method.
4201         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4202         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4203         (find_pc_sect_psymbol, fixup_psymbol_section)
4204         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4205         (print_partial_symbols, recursively_search_psymtabs)
4206         (compare_psymbols, psymbol_hash, psymbol_compare)
4207         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4208         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4209
4210 2018-07-26  Tom Tromey  <tromey@redhat.com>
4211
4212         * dbxread.c (end_psymtab): Remove dead code.
4213
4214 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4215
4216         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4217         DWARF unwinders are disabled.
4218         * dwarf2-frame.c: Add dwarf2read.h include.
4219         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4220         disabled.
4221         (dwarf2_frame_unwinders_enabled_p): Define.
4222         (show_dwarf_unwinders_enabled_p): New function.
4223         (_initialize_dwarf2_frame): Register switch to control DWARF
4224         unwinder use.
4225         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4226         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4227         (show_dwarf_cmdlist): Remove static keyword.
4228         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4229         (show_dwarf_cmdlist): Declare.
4230         * NEWS: Document new feature.
4231
4232 2018-07-26  Tom de Vries  <tdevries@suse.de>
4233
4234         PR breakpoints/23366
4235         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4236
4237 2018-07-26  Tom de Vries  <tdevries@suse.de>
4238
4239         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4240         DW_AT_count can't be translated to a dynamic prop.
4241
4242 2018-07-25  Tom de Vries  <tdevries@suse.de>
4243
4244         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4245         try/catch.
4246
4247 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4248
4249         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4250
4251 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4252
4253         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4254
4255 2018-07-24  Keith Seitz  <keiths@redhat.comt
4256
4257         PR symtab/23010
4258         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4259         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4260         instead of add_symbol_to_list.
4261         (read_file_scope): Call prepare_one_comp_unit before reading
4262         any other DIEs.
4263
4264 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4265
4266         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4267
4268 2018-07-24  Tom Tromey  <tom@tromey.com>
4269
4270         * utils.c (malloc, realloc, free): Don't declare.
4271         * configure, config.in: Rebuild.
4272         * configure.ac: Don't check for declarations of free, malloc, or
4273         realloc.
4274
4275 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4276
4277         * aarch64-linux-nat.c
4278         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4279         variable.
4280         * arm-linux-nat.c (fetch_regs): Likewise.
4281         (store_regs): Likewise.
4282         (fetch_vfp_regs): Likewise.
4283         (store_vfp_regs): Likewise.
4284         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4285         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4286         (arm_linux_nat_target::insert_watchpoint): Likewise.
4287         (arm_linux_nat_target::remove_watchpoint): Likewise.
4288         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4289         Likewise.
4290         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4291         Likewise.
4292         * ppc-linux-nat.c (fetch_register): Likewise.
4293         (fetch_all_gp_regs): Likewise.
4294         (fetch_ppc_registers): Likewise.
4295         (store_all_gp_regs): Likewise.
4296         (store_ppc_registers): Likewise.
4297         (hwdebug_insert_point): Likewise.
4298         (can_use_watchpoint_cond_accel): Likewise.
4299         * remote-sim.c (gdb_os_write_stdout): Likewise.
4300
4301 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4302             Tom Tromey  <tom@tromey.com>
4303
4304         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4305         test for it.
4306         * configure: Rebuild.
4307
4308 2018-07-22  Tom Tromey  <tom@tromey.com>
4309
4310         * regformats/regdat.sh: Define xmltarget_${name} inside
4311         #ifndef IN_PROCESS_AGENT.
4312
4313 2018-07-22  Tom Tromey  <tom@tromey.com>
4314
4315         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4316
4317 2018-07-22  Tom Tromey  <tom@tromey.com>
4318
4319         * symfile.c (reread_symbols): Notify iter, not objfile.
4320
4321 2018-07-22  Tom Tromey  <tom@tromey.com>
4322
4323         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4324         Use arch_ops.
4325         (ravenscar_thread_target::prepare_to_store): Likewise.
4326
4327 2018-07-22  Tom Tromey  <tom@tromey.com>
4328
4329         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4330         unused variable.  Call value_fetch_lazy when needed.
4331         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4332         Remove unused variable.  Call value_fetch_lazy when needed.
4333
4334 2018-07-22  Tom Tromey  <tom@tromey.com>
4335
4336         * m32c-tdep.c (mark_dma): Return void.
4337         (make_regs): Remove unused declarations.
4338
4339 2018-07-22  Tom Tromey  <tom@tromey.com>
4340
4341         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4342         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4343         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4344         bkscm_get_valid_block_smob_arg_unsafe for effect.
4345
4346 2018-07-22  Tom Tromey  <tom@tromey.com>
4347
4348         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4349         value_type.
4350
4351 2018-07-22  Tom Tromey  <tom@tromey.com>
4352
4353         * windows-nat.c (saved_context): Conditionally define.
4354         * remote.c (remote_target::remote_btrace_maybe_reopen):
4355         Conditionally declare "warned".
4356         * inflow.c (sigquit_ours): Conditionally define.
4357         (new_tty): Move "tty" declaration inside #if.
4358         * guile/guile.c (guile_datadir): Conditionally define.
4359         * charset.c (set_be_le_names): Move some declarations inside #if.
4360         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4361         #if.
4362         (parse_xml_btrace_conf): Likewise.
4363
4364 2018-07-22  Tom Tromey  <tom@tromey.com>
4365
4366         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4367
4368 2018-07-22  Tom Tromey  <tom@tromey.com>
4369
4370         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4371         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4372         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4373         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4374         * stack.c (frame_apply_level_command): Remove unused variable.
4375         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4376         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4377         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4378         unused variable.
4379         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4380         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4381         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4382         variable.
4383         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4384         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4385         variable.
4386         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4387         Remove unused variable.
4388         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4389         variable.
4390         * common/tdesc.c (print_xml_feature::visit): Remove unused
4391         variable.
4392         * compile/compile-object-load.c (store_regs): Remove unused
4393         variables.
4394         * complaints.c (clear_complaints): Remove unused variable.
4395         * corelow.c (core_target_open): Remove unused variable.
4396         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4397         variable.
4398         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4399         variable.
4400         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4401         variable.
4402         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4403         variable.
4404         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4405         variable.
4406         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4407         variable.
4408         * ia64-tdep.c (examine_prologue): Remove unused variable.
4409         * infcall.c (run_inferior_call): Remove unused variable.
4410         * inferior.c (exit_inferior): Remove unused variable.
4411         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4412         * linespec.c (decode_line_2): Remove unused variable.
4413         * linux-nat.c (super_close): Remove.
4414         * linux-tdep.c (linux_info_proc): Remove unused variable.
4415         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4416         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4417         Remove unused variable.
4418         * parse.c (find_minsym_type_and_address): Remove unused variable.
4419         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4420         variable.
4421         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4422         variable.
4423         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4424         variables.
4425         * record-btrace.c (record_btrace_target::store_registers): Remove
4426         unused variable.
4427         (cmd_show_record_btrace_cpu): Remove unused variable.
4428         * riscv-tdep.c (riscv_register_reggroup_p)
4429         (riscv_push_dummy_call, riscv_return_value): Remove unused
4430         variable.
4431         * rust-exp.y (literal): Remove unused variable.
4432         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4433         unused variable.
4434         <STRUCTOP_ANONYMOUS>: Likewise.
4435         * s390-linux-tdep.c (s390_linux_init_abi_31)
4436         (s390_linux_init_abi_64): Remove unused variable.
4437         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4438         (file_select_thread, net_windows_open, _initialize_ser_windows):
4439         Remove unused variables.
4440         * symtab.c (find_pc_sect_line): Remove unused variable.
4441         * target-memory.c (compute_garbled_blocks): Remove unused
4442         variable.
4443         (target_write_memory_blocks): Remove unused variable.
4444         * target.c (target_stack::unpush): Remove unused variables.
4445         * tracepoint.c (start_tracing, all_tracepoint_actions)
4446         (merge_uploaded_trace_state_variables)
4447         (print_one_static_tracepoint_marker): Remove unused variable.
4448         * unittests/basic_string_view/element_access/char/1.cc (test01):
4449         Remove unused variable.
4450         * windows-nat.c (windows_continue, windows_add_all_dlls)
4451         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4452         Remove unused variables.
4453
4454 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4455
4456         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4457         attr_profile in HAVE_ELF.
4458         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4459         HAVE_ELF.
4460
4461 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4462
4463         * frame.c (frame_register_unwind): Change parameter name.
4464         (frame_unwind_register): Likewise.
4465         (frame_unwind_register_value): Likewise.
4466         (frame_unwind_register_signed): Likewise.
4467         (frame_unwind_register_unsigned): Likewise.
4468         * frame.h (frame_register_unwind): Likewise.
4469         (frame_unwind_register): Likewise.
4470         (frame_unwind_register_value): Likewise.
4471         (frame_unwind_register_signed): Likewise.
4472         (frame_unwind_register_unsigned): Likewise.
4473         (frame_unwind_arch): Likewise.
4474
4475 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4476
4477         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4478         ISA maintenance.
4479
4480 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4481
4482         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4483         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4484         hand.
4485
4486 2018-07-20  Keith Seitz  <keiths@redhat.com>
4487
4488         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4489         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4490         m_compunit_symtab, m_language>: Add "m_" prefix.
4491         Update all uses.
4492         * buildsym.c: Update all uses.
4493
4494 2018-07-20  Tom Tromey  <tom@tromey.com>
4495
4496         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4497         * buildsym.h (record_line_ftype): Remove typedef.
4498
4499 2018-07-20  Tom Tromey  <tom@tromey.com>
4500
4501         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4502         (end_expandable_symtab): Likewise.
4503         (end_symtab_get_static_block): Likewise.
4504         (end_symtab_from_static_block): Likewise.
4505         * buildsym-legacy.c (augment_type_symtab): Remove.
4506         (end_expandable_symtab): Remove.
4507         (end_symtab_get_static_block): Remove.
4508         (end_symtab_from_static_block): Remove.
4509
4510 2018-07-20  Tom Tromey  <tom@tromey.com>
4511
4512         * dwarf2read.c: Include buildsym.h.
4513         (struct dwarf2_cu) <builder>: New method.
4514         (fixup_go_packaging): Update.
4515         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4516         use scoped_free_pendings.
4517         (using_directives): Add "cu" parameter, remove "language".
4518         (read_import_statement, setup_type_unit_groups, )
4519         (read_func_scope, read_lexical_block_scope)
4520         (dwarf2_record_block_ranges, read_namespace): Update.
4521         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4522         (lnp_state_machine::handle_end_sequence): Update.
4523         (class lnp_state_machine) <m_cu>: New member.
4524         <m_record_line_callback>: Remove.
4525         <m_currently_recording_lines>: New member.
4526         (lnp_state_machine::handle_set_file): Update.
4527         (noop_record_line): Remove.
4528         (dwarf_record_line_p): Add cu parameter.
4529         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4530         (lnp_state_machine::record_line)
4531         (lnp_state_machine::lnp_state_machine)
4532         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4533         (dwarf_decode_lines): Update.
4534         (dwarf2_start_subfile): Add cu parameter.
4535         (dwarf2_start_symtab, new_symbol): Update.
4536         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4537         Remove dwarf2_per_objfile parameter.
4538         (dwarf_decode_macros): Update.
4539
4540 2018-07-20  Tom Tromey  <tom@tromey.com>
4541
4542         * stabsread.c (define_symbol): Update.
4543         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4544         * dwarf2read.c (new_symbol): Update.
4545         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4546         * cp-namespace.c: Include buildsym.h.
4547         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4548         * buildsym-legacy.c (get_buildsym_compunit): New function.
4549
4550 2018-07-20  Tom Tromey  <tom@tromey.com>
4551
4552         * xcoffread.c: Include buildsym-legacy.h.
4553         * windows-nat.c: Include buildsym-legacy.h.
4554         * stabsread.c: Include buildsym-legacy.h.
4555         * mdebugread.c: Include buildsym-legacy.h.
4556         * buildsym-legacy.h: New file.
4557         * buildsym-legacy.c: New file, from buildsym.c.
4558         * go32-nat.c: Include buildsym-legacy.h.
4559         * dwarf2read.c: Include buildsym-legacy.h.
4560         * dbxread.c: Include buildsym-legacy.h.
4561         * cp-namespace.c: Include buildsym-legacy.h.
4562         * coffread.c: Include buildsym-legacy.h.
4563         * buildsym.h: Move some contents to buildsym-legacy.h.
4564         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4565         buildsym-legacy.c.
4566         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4567
4568 2018-07-20  Tom Tromey  <tom@tromey.com>
4569
4570         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4571         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4572         (buildsym_compunit::buildsym_compunit)
4573         (buildsym_compunit::~buildsym_compunit)
4574         (buildsym_compunit::get_macro_table): Define.
4575
4576 2018-07-20  Tom Tromey  <tom@tromey.com>
4577
4578         * buildsym.c (reset_symtab_globals): Remove.
4579         (buildsym_compunit::end_symtab_from_static_block): Update.
4580         (buildsym_compunit::augment_type_symtab): Update.
4581         (end_symtab_from_static_block): Call free_buildsym_compunit.
4582         (augment_type_symtab, end_symtab, end_expandable_symtab):
4583         Likewise.
4584
4585 2018-07-20  Tom Tromey  <tom@tromey.com>
4586
4587         * arch-utils.c: Do not include buildsym.h.
4588         * mipsread.c: Do not include buildsym.h.
4589         * machoread.c: Do not include buildsym.h.
4590         * elfread.c: Do not include buildsym.h.
4591
4592 2018-07-20  Tom Tromey  <tom@tromey.com>
4593
4594         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4595         initialization.
4596         (buildsym_compunit): Add new constructor.
4597         (struct buildsym_compunit) <get_last_source_file, finish_block,
4598         record_block_range, start_subfile, patch_subfile_names,
4599         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4600         set_last_source_start_addr, get_last_source_start_addr,
4601         get_local_using_directives, set_local_using_directives,
4602         get_global_using_directives, outermost_context_p,
4603         get_current_context_stack, get_context_stack_depth,
4604         get_current_subfile, get_local_symbols, get_file_symbols,
4605         get_global_symbols, record_debugformat, record_producer,
4606         push_context, pop_context, end_symtab_get_static_block,
4607         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4608         New public methods.
4609         <record_pending_block, finish_block_internal, make_blockvector,
4610         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4611         private methods.
4612         Update all users.
4613
4614 2018-05-22  Tom Tromey  <tom@tromey.com>
4615
4616         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4617         parameter.
4618         (finish_block_internal): Update.
4619
4620 2018-07-20  Tom Tromey  <tom@tromey.com>
4621
4622         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4623         parameter.
4624         (finish_block_internal): Update.
4625
4626 2018-07-20  Tom Tromey  <tom@tromey.com>
4627
4628         * buildsym.h (EXTERN): Don't define or undef.
4629         * buildsym.c (EXTERN): Don't define.
4630
4631 2018-07-20  Tom Tromey  <tom@tromey.com>
4632
4633         * buildsym.c: Remove TODO comment.
4634
4635 2018-07-20  Tom Tromey  <tom@tromey.com>
4636
4637         * coffread.c (coff_symtab_read): Update.
4638         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4639         (xcoff_new_init): Update.
4640         * mipsread.c (mipscoff_new_init): Update.
4641         * mdebugread.c (mdebug_build_psymtabs): Update.
4642         * elfread.c (elf_new_init): Update.
4643         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4644         Update.
4645         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4646         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4647         (stabsect_build_psymtabs): Update.
4648         * buildsym.h (buildsym_init): Don't declare.
4649         * buildsym.c: Update comment.
4650         (prepare_for_building): Remove.
4651         (start_symtab, restart_symtab): Update.
4652         (reset_symtab_globals): Update comment.
4653         (buildsym_init): Remove.
4654
4655 2018-07-20  Tom Tromey  <tom@tromey.com>
4656
4657         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4658         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4659         (read_enum_type, common_block_start, common_block_end)
4660         (cleanup_undefined_types_1, finish_global_stabs): Update.
4661         * mdebugread.c (psymtab_to_symtab_1): Update.
4662         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4663         (read_lexical_block_scope, new_symbol): Update.
4664         * dbxread.c (process_one_symbol): Update.
4665         * coffread.c (coff_symtab_read, process_coff_symbol)
4666         (coff_read_enum_type): Update.
4667         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4668         declare.
4669         (get_local_symbols, get_file_symbols, get_global_symbols): New
4670         functions.
4671         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4672         m_global_symbols.
4673         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4674         (~scoped_free_pendings): Update.
4675         (finish_block, prepare_for_building, reset_symtab_globals)
4676         (end_symtab_get_static_block, end_symtab_with_blockvector)
4677         (augment_type_symtab, push_context): Update.
4678         (get_local_symbols, get_file_symbols, get_global_symbols): New
4679         functions.
4680         (buildsym_init): Update.
4681
4682 2018-07-20  Tom Tromey  <tom@tromey.com>
4683
4684         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4685         (process_full_type_unit): Likewise.
4686         (dwarf2_start_symtab): Set list_in_scope.
4687
4688 2018-07-20  Tom Tromey  <tom@tromey.com>
4689
4690         * dwarf2read.c (process_psymtab_comp_unit_reader)
4691         (build_type_psymtabs_reader): Do not set list_in_scope.
4692
4693 2018-07-20  Tom Tromey  <tom@tromey.com>
4694
4695         * buildsym.c (free_pendings): Remove.
4696         (add_symbol_to_list, scoped_free_pendings)
4697         (finish_block_internal, buildsym_init): Update.
4698
4699 2018-07-20  Tom Tromey  <tom@tromey.com>
4700
4701         * xcoffread.c (read_xcoff_symtab): Update.
4702         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4703         Update.
4704         * dbxread.c (process_one_symbol): Update.
4705         * coffread.c (coff_symtab_read): Update.
4706         * buildsym.h (finish_block): Update.
4707         * buildsym.c (finish_block): Remove "listhead" argument.
4708         (end_symtab_get_static_block): Update.
4709
4710 2018-07-20  Tom Tromey  <tom@tromey.com>
4711
4712         * buildsym.h (class scoped_free_pendings): Remove constructor.
4713         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4714         method.
4715         <m_pending_block_obstack, m_pending_blocks>: New members.
4716         (pending_block_obstack, pending_blocks): Remove.
4717         (scoped_free_pendings::scoped_free_pendings): Default.
4718         (~scoped_free_pendings): Update.
4719         (free_pending_blocks): Remove.
4720         (finish_block_internal, record_pending_block, make_blockvector)
4721         (end_symtab_get_static_block, augment_type_symtab, push_context)
4722         (buildsym_init): Update.
4723
4724 2018-07-20  Tom Tromey  <tom@tromey.com>
4725
4726         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4727         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4728         members.
4729         (pending_addrmap, pending_addrmap_obstack)
4730         (pending_addrmap_interesting): Remove.
4731         (scoped_free_pendings, record_block_range, make_blockvector)
4732         (prepare_for_building, reset_symtab_globals, buildsym_init):
4733         Update.
4734
4735 2018-07-20  Tom Tromey  <tom@tromey.com>
4736
4737         * xcoffread.c (process_linenos): Update.
4738         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4739         * mdebugread.c (psymtab_to_symtab_1): Update.
4740         * dwarf2read.c (setup_type_unit_groups)
4741         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4742         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4743         * dbxread.c (process_one_symbol): Update.
4744         * coffread.c (coff_symtab_read, enter_linenos)
4745         (process_coff_symbol): Update.
4746         * buildsym.h (current_subfile): Don't declare.
4747         (get_current_subfile): Declare.
4748         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4749         member.
4750         (start_subfile, free_buildsym_compunit, push_subfile)
4751         (prepare_for_building, start_symtab): Update.
4752         (get_current_subfile): New function.
4753
4754 2018-07-20  Tom Tromey  <tom@tromey.com>
4755
4756         * coffread.c (coff_symtab_read): Update.
4757         * xcoffread.c (read_xcoff_symtab): Update.
4758         * dwarf2read.c (new_symbol): Update.
4759         (read_func_scope, read_lexical_block_scope): Update.
4760         * dbxread.c (process_one_symbol): Update.
4761         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4762         (outermost_context_p): Remove macro.
4763         (outermost_context_p, get_current_context_stack)
4764         (get_context_stack_depth): Declare.
4765         (pop_context): Return struct context_stack.
4766         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4767         member.
4768         (context_stack_size): Remove.
4769         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4770         (prepare_for_building, end_symtab_get_static_block)
4771         (augment_type_symtab, push_context): Update.
4772         (pop_context): Return struct context_stack.
4773         (outermost_context_p, get_current_context_stack)
4774         (get_context_stack_depth): New functions.
4775         (buildsym_init): Update.
4776
4777 2018-07-20  Tom Tromey  <tom@tromey.com>
4778
4779         * rust-exp.y: Now a pure parser.  Update all rules.
4780         (%union): Move earlier.
4781         (current_parser, work_obstack): Remove globals.
4782         (rust_parser, ~rust_parser): Update.
4783         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4784         lex_character, lex_number, lex_string, lex_identifier,
4785         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4786         convert_name, convert_params_to_expression,
4787         convert_ast_to_expression, ast_basic_type, ast_operation,
4788         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4789         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4790         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4791         ast_array_type, ast_slice_type, ast_reference_type,
4792         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4793         (rust_parse): Update.
4794         (rustyyerror, rustyylex): Add parser parameter.
4795         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4796         (rust_lex_stringish_test, rust_lex_test_sequence)
4797         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4798         (rust_lex_test_push_back, rust_lex_tests): Update.
4799
4800 2018-07-19  Pedro Alves  <palves@redhat.com>
4801
4802         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4803         gdb::unique_xmalloc_ptr.
4804         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4805         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4806         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4807         copy-initialization.
4808         * guile/scm-pretty-print.c (ppscm_print_children): Use
4809         gdb::unique_xmalloc_ptr instead of cleanups.
4810         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4811         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4812         gdb::unique_xmalloc_ptr.
4813         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4814         Adjust to use gdb::unique_xmalloc_ptr.
4815         * guile/scm-utils.c (extract_arg): Adjust.
4816         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4817         gdb::unique_xmalloc_ptr instead of a cleanup.
4818
4819 2018-07-19  Tom Tromey  <tom@tromey.com>
4820
4821         * utils.c (do_value_free_to_mark)
4822         (make_cleanup_value_free_to_mark): Remove.
4823         * utils.h (make_cleanup_value_free_to_mark): Remove.
4824
4825 2018-07-19  Pedro Alves  <palves@redhat.com>
4826
4827         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4828         forwarding reference.
4829
4830 2018-07-18  Pedro Alves  <palves@redhat.com>
4831
4832         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4833         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4834         cleanup.
4835
4836 2018-07-18  Pedro Alves  <palves@redhat.com>
4837
4838         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4839         exceptions.
4840         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4841         (gdbscm_wrap): New.
4842         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4843         directly instead of a cleanup.
4844         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4845         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4846         (vlscm_binop_gdbthrow): New, factored out from ...
4847         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4848         (vlscm_rich_compare): Use gdbscm_wrap.
4849         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4850         instead of a cleanup.
4851         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4852         cleanup.
4853         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4854         Use xfree directly instead of a cleanup.
4855         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4856         Adjust to use gdbscm_wrap and scoped_value_mark.
4857         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4858         (gdbscm_value_address, gdbscm_value_dereference)
4859         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4860         scoped_value_mark.
4861         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4862         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4863         scoped_value_mark.
4864         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4865         gdbscm_wrap and scoped_value_mark.
4866         (gdbscm_value_to_string): Use xfree directly instead of a
4867         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4868         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4869         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4870         scoped_value_mark.
4871         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4872         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4873         scoped_value_mark.
4874         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4875         gdbscm_wrap.
4876
4877 2018-07-18  Tom de Vries  <tdevries@suse.de>
4878
4879         * findvar.c (default_read_var_value): Also resolve dynamic type for
4880         LOC_OPTIMIZED_OUT vars.
4881
4882 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4883
4884         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4885         decoding.
4886
4887 2018-07-17  Tom Tromey  <tom@tromey.com>
4888
4889         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4890         (compute_enum_list, pascm_set_param_value_x)
4891         (gdbscm_parameter_value): Update.
4892         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4893         (gdbscm_scm_to_host_string): Update.
4894         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4895         Update.
4896         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4897         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4898         * guile/scm-string.c (gdbscm_scm_to_string): Return
4899         unique_xmalloc_ptr.
4900         (gdbscm_scm_to_host_string): Likewise.
4901
4902 2018-07-17  Tom Tromey  <tom@tromey.com>
4903
4904         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4905         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4906         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4907         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4908         unique_xmalloc_ptr.
4909
4910 2018-07-17  Tom Tromey  <tom@tromey.com>
4911
4912         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4913         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4914         Update.
4915         * guile/scm-cmd.c (cmdscm_function): Update.
4916         * guile/scm-pretty-print.c
4917         (ppscm_print_exception_unless_memory_error): Update.
4918         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4919         Return unique_xmalloc_ptr.
4920
4921 2018-07-17  Tom Tromey  <tom@tromey.com>
4922
4923         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4924         Use string_printf.
4925
4926 2018-07-17  Jim Wilson  <jimw@sifive.com>
4927
4928         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4929         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4930         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4931         unecessary braces after EF_RISCV_RVC test.  Delete call to
4932         set_gdbarch_decr_pc_after_break.
4933
4934         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4935         RISCV_LAST_FP_REGNUM + 1.
4936         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4937
4938 2018-07-17  Tom Tromey  <tom@tromey.com>
4939
4940         * configure.ac: Remove --disable-gdbcli.
4941         * configure: Rebuild.
4942         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4943         (SUBDIR_CLI_CFLAGS): Remove.
4944         (SFILES): Use SUBDIR_CLI_SRCS.
4945         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4946
4947 2018-07-17  Tom Tromey  <tom@tromey.com>
4948
4949         PR gdb/18624:
4950         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4951
4952 2018-07-16  Jim Wilson  <jimw@sifive.com>
4953
4954         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4955
4956 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4957
4958         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4959         variable.
4960         (libunwind_frame_sniffer): Likewise.
4961         (libunwind_frame_prev_register): Likewise.
4962         (libunwind_sigtramp_frame_sniffer): Likewise.
4963         * ia64-tdep.c (ia64_access_reg): Likewise.
4964         (ia64_access_rse_reg): Likewise.
4965         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4966         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4967
4968 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4969
4970         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4971
4972 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4973
4974         * remote-sim.c (gdbsim_target::close,
4975         gdbsim_target::mourn_inferior): Remove unused variables.
4976
4977 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4978
4979         * ia64-tdep.c (ktab_buf): New global.
4980         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4981         (get_kernel_table): Adjust.
4982
4983 2018-07-16  Tom Tromey  <tom@tromey.com>
4984
4985         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4986         * dwarf2read.c (using_directives, new_symbol): Use
4987         outermost_context_p.
4988         * dbxread.c (process_one_symbol): Use outermost_context_p.
4989         * coffread.c (coff_symtab_read): Use outermost_context_p.
4990
4991 2018-07-16  Tom Tromey  <tom@tromey.com>
4992
4993         * dwarf2read.c (using_directives, read_func_scope)
4994         (read_lexical_block_scope): Update.
4995         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4996         * buildsym.h (local_using_directives, global_using_directives):
4997         Don't declare.
4998         (get_local_using_directives, set_local_using_directives)
4999         (get_global_using_directives): Declare.
5000         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5001         m_global_using_directives>: New members.
5002         (finish_block_internal, prepare_for_building)
5003         (reset_symtab_globals, end_symtab_get_static_block)
5004         (push_context): Update.
5005         (get_local_using_directives, set_local_using_directives)
5006         (get_global_using_directives): New functions.
5007         (buildsym_init): Update.
5008
5009 2018-07-16  Tom Tromey  <tom@tromey.com>
5010
5011         * xcoffread.c (xcoff_initial_scan): Don't call
5012         free_pending_blocks.
5013         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5014         * buildsym.h (class scoped_free_pendings): Add constructor.
5015         (free_pending_blocks): Don't declare.
5016         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5017         (free_pending_blocks): Now static.
5018
5019 2018-07-16  Tom Tromey  <tom@tromey.com>
5020
5021         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5022         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5023         member.
5024         (struct subfile_stack): Remove.
5025         (subfile_stack): Remove.
5026         (push_subfile, pop_subfile, buildsym_init): Update.
5027
5028 2018-07-16  Tom Tromey  <tom@tromey.com>
5029
5030         * buildsym.c (push_subfile): Use gdb_assert.
5031         (pop_subfile): Use gdb_assert.
5032
5033 2018-07-16  Tom Tromey  <tom@tromey.com>
5034
5035         * buildsym.h (merge_symbol_lists): Remove.
5036         * buildsym.c (merge_symbol_lists): Remove.
5037
5038 2018-07-16  Tom Tromey  <tom@tromey.com>
5039
5040         * stabsread.c (scan_file_globals): Update comment.
5041         * stabsread.h (scan_file_globals): Move from buildsym.h.
5042         * buildsym.h (scan_file_globals): Move to stabsread.h.
5043
5044 2018-07-16  Tom Tromey  <tom@tromey.com>
5045
5046         * xcoffread.c (xcoff_new_init): Update.
5047         * mipsread.c (mipscoff_new_init): Update.
5048         * mdebugread.c (mdebug_build_psymtabs): Update.
5049         * elfread.c (elf_new_init): Update.
5050         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5051         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5052         * buildsym.h (buildsym_new_init): Don't declare.
5053         * buildsym.c (buildsym_new_init): Remove.
5054
5055 2018-07-16  Tom Tromey  <tom@tromey.com>
5056
5057         * stabsread.h (within_function): Move from buildsym.h.
5058         * stabsread.c (start_stabs): Clear within_function.
5059         * coffread.c (coff_start_symtab): Clear within_function.
5060         * buildsym.h (within_function): Move to stabsread.h.
5061         * buildsym.c (prepare_for_building): Update.
5062
5063 2018-07-16  Tom Tromey  <tom@tromey.com>
5064
5065         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5066         * dwarf2read.c (dwarf2_start_symtab): Don't set
5067         processing_gcc_compilation.
5068         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5069
5070 2018-07-16  Tom Tromey  <tom@tromey.com>
5071
5072         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5073         (next_symbol_text_func): Move from buildsym.h.
5074         * stabsread.c (hashname): Move from buildsym.c.
5075         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5076         (next_symbol_text_func, hashname): Move to stabsread.h.
5077         * buildsym.c: Don't include bcache.h
5078         (hashname): Move to stasbread.c.
5079
5080 2018-07-16  Tom Tromey  <tom@tromey.com>
5081
5082         * buildsym.h (context_stack_size): Don't declare.
5083         * buildsym.c (context_stack_size): New global.
5084
5085 2018-07-16  Tom Tromey  <tom@tromey.com>
5086
5087         * dbxread.c (processing_acc_compilation): New global.
5088         * buildsym.h (processing_acc_compilation): Don't declare.
5089
5090 2018-07-16  Tom Tromey  <tom@tromey.com>
5091
5092         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5093         * dbxread.c (read_ofile_symtab): Update.
5094         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5095         * buildsym.h (last_source_start_addr): Remove.
5096         (set_last_source_start_addr, get_last_source_start_addr):
5097         Declare.
5098         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5099         parameter.
5100         (struct buildsym_compunit) <m_last_source_start_addr>: New
5101         member.
5102         (prepare_for_building): Remove start_addr parameter.
5103         (start_symtab, restart_symtab, end_symtab_get_static_block)
5104         (end_symtab_with_blockvector): Update.
5105         (set_last_source_start_addr, get_last_source_start_addr): New
5106         functions.
5107
5108 2018-07-16  Tom Tromey  <tom@tromey.com>
5109
5110         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5111         member.
5112         (have_line_numbers): Remove.
5113         (record_line, prepare_for_building, end_symtab_get_static_block)
5114         (augment_type_symtab): Update.
5115
5116 2018-07-16  Tom Tromey  <tom@tromey.com>
5117
5118         * buildsym.c (~buildsym_compunit): Free the macro table.
5119         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5120         methods.
5121         <m_pending_macros>: New member.
5122         (pending_macros): Remove.
5123         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5124         (reset_symtab_globals, end_symtab_get_static_block)
5125         (end_symtab_with_blockvector, augment_type_symtab)
5126         (buildsym_init): Update.
5127
5128 2018-07-16  Tom Tromey  <tom@tromey.com>
5129
5130         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5131         parameter.
5132         (buildsym_compunit::set_last_source_file): New method.
5133         <m_last_source_file>: New member.
5134         (prepare_for_building): Remove "name" parameter.
5135         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5136         (last_source_file): Remove.
5137         (set_last_source_file, get_last_source_file): Update.
5138
5139 2018-07-16  Tom Tromey  <tom@tromey.com>
5140
5141         * buildsym.c (prepare_for_building): Add assert.
5142
5143 2018-07-16  Tom Tromey  <tom@tromey.com>
5144
5145         * buildsym.c (~buildsym_compunit): Update.
5146         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5147         (start_subfile, patch_subfile_names)
5148         (end_symtab_with_blockvector): Update.
5149
5150 2018-07-16  Tom Tromey  <tom@tromey.com>
5151
5152         * buildsym.c (struct buildsym_compunit): Add constructor,
5153         destructor, initializers.
5154         (start_buildsym_compunit): Remove.
5155         (free_buildsym_compunit): Use "delete".
5156         (start_symtab, restart_symtab): Use "new".
5157
5158 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5159
5160         * symfile.c (set_objfile_default_section_offset): Remove struct
5161         keyword.
5162
5163 2018-07-14  Stafford Horne  <shorne@gmail.com>
5164
5165         * (Responsible Maintainers): Add myself as or1k maintainer.
5166
5167 2018-07-13  Tom Tromey  <tom@tromey.com>
5168
5169         * symfile.c (set_objfile_default_section_offset): Use extra braces
5170         around initializer.
5171
5172 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5173
5174         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5175         non-branching basr.
5176
5177 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5178
5179         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5180         unittests/cli-utils-selftests.c
5181         * unittests/cli-utils-selftests.c: New file.
5182
5183 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5184
5185         * NEWS: Mention new commands. Mention change to 'thread apply'.
5186
5187 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5188
5189         * thread.c (thr_try_catch_cmd): New function.
5190         (thread_apply_all_command): Handle qcs flags.
5191         (thread_apply_command): Handle qcs flags.
5192         (taas_command): New function.
5193         (tfaas_command): New function.
5194         (_initialize_thread): Update to setup the new commands 'taas
5195         and 'tfaas'. Change doc string for 'thread apply'.
5196
5197 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5198
5199         * stack.c: (trailing_outermost_frame): New function, mostly
5200         extracted from backtrace_command_1.
5201         (leading_innermost_frame): New function.
5202         (backtrace_command_1): Update to call trailing_outermost_frame.
5203         (frame_apply_command_count): New function.
5204         (frame_apply_level_command): New function.
5205         (frame_apply_all_command): New function.
5206         (frame_apply_command): New function.
5207         (faas_command): New function.
5208         (frame_cmd_list): New variable.
5209         (_initialize_stack): Update to setup the new commands 'frame apply'
5210         and 'faas'.
5211
5212 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5213
5214         * cli-utils.c (number_or_range_parser::get_number): Only handle
5215         numbers or convenience var as numbers.
5216         (parse_flags): New function.
5217         (parse_flags_qcs): New function.
5218         (number_or_range_parser::finished): Ensure parsing end is detected
5219         before end of string.
5220         * cli-utils.h (parse_flags): New function.
5221         (parse_flags_qcs): New function.
5222         (number_or_range_parser): Remove m_finished bool.
5223         (number_or_range_parser::skip_range): Set m_in_range to false.
5224
5225 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5226
5227         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5228         on Windows.
5229
5230 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5231             Jan Kratochvil  <jan.kratochvil@redhat.com>
5232             Paul Fertser  <fercerpav@gmail.com>
5233             Tsutomu Seki  <sekiriki@gmail.com>
5234             Pedro Alves  <palves@redhat.com>
5235
5236         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5237         'unittests/parse-connection-spec-selftests.c'.
5238         (COMMON_SFILES): Add 'common/netstuff.c'.
5239         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5240         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5241         * common/netstuff.c: New file.
5242         * common/netstuff.h: New file.
5243         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5244         (wait_for_connect): Update comment.  New parameter
5245         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5246         Use 'sock' directly instead of 'scb->fd'.
5247         (try_connect): New function, with code from 'net_open'.
5248         (net_open): Rewrite main loop to deal with multiple
5249         sockets/addresses.  Handle IPv6-style hostnames; implement
5250         support for IPv6 connections.
5251         * unittests/parse-connection-spec-selftests.c: New file.
5252
5253 2018-07-11  Pedro Alves  <palves@redhat.com>
5254
5255         PR gdb/23377
5256         * remote.c (remote_target::remote_detach_pid): Call
5257         set_current_process.
5258
5259 2018-07-11  Pedro Alves  <palves@redhat.com>
5260
5261         * h8300-tdep.c (h8300_gdbarch_init): Remove
5262         set_gdbarch_ecoff_reg_to_regnum calls.
5263
5264 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5265
5266         PR c++/23373
5267         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5268         offsets/sizes for static members of a class/struct.
5269
5270 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5271
5272         * target-descriptions.c (tdesc_register_bitsize): Rename.
5273         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5274         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5275         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5276
5277 2018-07-10  Tom Tromey  <tom@tromey.com>
5278
5279         * breakpoint.c (moribund_locations): Now static and a
5280         std::vector.
5281         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5282         (build_bpstat_chain, update_global_location_list)
5283         (breakpoint_retire_moribund): Update.
5284         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5285         VEC.
5286
5287 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5288
5289         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5290         (riscv_register_reggroup_p): Use new function, remove unneeded
5291         parenthesis.
5292         (riscv_push_dummy_call): Extend assert to compare against xlen or
5293         flen based on register type.
5294
5295 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5296
5297         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5298
5299 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5300
5301         * remote.c (show_hardware_watchpoint_limit): New function.
5302         (show_hardware_watchpoint_length_limit): New function.
5303         (show_hardware_breakpoint_limit): New function.
5304         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5305         where appropriate, update help text.
5306
5307 2018-07-09  Tom Tromey  <tom@tromey.com>
5308
5309         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5310         (CLIBS): Don't mention NAT_CLIBS.
5311
5312 2018-07-09  Tom Tromey  <tom@tromey.com>
5313
5314         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5315         (LIBGDB_OBS, clean mostlyclean): Update.
5316         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5317
5318 2018-07-09  Tom Tromey  <tom@tromey.com>
5319
5320         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5321         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5322         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5323
5324 2018-07-09  Tom Tromey  <tom@tromey.com>
5325
5326         * Makefile.in (ALLDEPFILES): Remove exec.c.
5327         (COMMON_OBS): Remove exec.o.
5328         (COMMON_SFILES): Add exec.c.
5329
5330 2018-07-09  Tom Tromey  <tom@tromey.com>
5331
5332         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5333
5334 2018-07-09  Tom Tromey  <tom@tromey.com>
5335
5336         * Makefile.in (clean mostlyclean): Remove stamp-version.
5337         (version.c): Depend on stamp-version.
5338         (stamp-version): New rule, from version.c rule.
5339
5340 2018-07-09  Tom Tromey  <tom@tromey.com>
5341
5342         * Makefile.in (init.c): Depend on stamp-init.
5343         (stamp-init): New rule, from init.c rule.
5344         (clean mostlyclean): Remove stamp-init.
5345
5346 2018-07-09  Tom Tromey  <tom@tromey.com>
5347
5348         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5349         SUBDIR_GCC_COMPILE_SRCS.
5350
5351 2018-07-09  Tom Tromey  <tom@tromey.com>
5352
5353         * Makefile.in (init.c): Remove some unused sed rules.
5354
5355 2018-07-09  Tom Tromey  <tom@tromey.com>
5356
5357         * Makefile.in (TSOBS): Remove.
5358         (INIT_FILES): Update.
5359         (LIBGDB_OBS): Update.
5360         (COMMON_SFILES): Add inflow.c.
5361         (SFILES): Remove inflow.c.
5362
5363 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5364
5365         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5366
5367 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5368
5369         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5370         get_saveloc_name, is_signal_frame_name, step_name,
5371         init_remote_name, create_addr_space_name,
5372         destroy_addr_space_name, search_unwind_table_name,
5373         find_dyn_list_name): Constify.
5374
5375 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5376
5377         * darwin-nat.c (darwin_pthread_kill): New function.
5378         (darwin_resume_thread): Use darwin_pthread_kill.
5379
5380 2018-07-05  Tom de Vries  <tdevries@suse.de>
5381
5382         * macroexp.c (macro_buffer) <operator=>: New member function.
5383
5384 2018-07-04  Tom Tromey  <tom@tromey.com>
5385
5386         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5387
5388 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5389
5390         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5391         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5392         * maint.c: Likewise.
5393         * top.c: Likewise.
5394
5395 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5396
5397         * NEWS: Create a new section for the next release branch.
5398         Rename the section of the current branch, now that it has
5399         been cut.
5400
5401 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5402
5403         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5404         * version.in: Bump version to 8.2.50.DATE-git.
5405
5406 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5407             Pedro Alves  <palves@redhat.com>
5408
5409         * linux-nat.c (linux_init_ptrace): Rename to ...
5410         (linux_init_ptrace_procfs): ... this.  Call
5411         linux_proc_init_warnings.
5412         (linux_nat_target::post_attach)
5413         (linux_nat_target::post_startup_inferior): Adjust.
5414         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5415         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5416
5417 2018-07-04  Tom de Vries  <tdevries@suse.de>
5418
5419         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5420         check ...
5421         (read_comp_unit_head): ... here.
5422
5423 2018-07-03  Tom Tromey  <tom@tromey.com>
5424
5425         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5426         (stop_tracing, tstatus_command)
5427         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5428         (print_one_static_tracepoint_marker): Update.
5429         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5430         std::vector.
5431         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5432         VEC.
5433         (all_tracepoints, static_tracepoints_here): Return std::vector.
5434
5435 2018-07-03  Tom Tromey  <tom@tromey.com>
5436
5437         * common/ptid.c (ptid_equal): Remove.
5438         * common/ptid.h (ptid_equal): Don't declare.
5439         * ada-tasks.c: Update.
5440         * breakpoint.c: Update.
5441         * common/agent.c: Update.
5442         * corelow.c: Update.
5443         * darwin-nat-info.c: Update.
5444         * darwin-nat.c: Update.
5445         * dcache.c: Update.
5446         * dtrace-probe.c: Update.
5447         * dummy-frame.c: Update.
5448         * fbsd-nat.c: Update.
5449         * frame.c: Update.
5450         * gdbthread.h: Update.
5451         * gnu-nat.c: Update.
5452         * go32-nat.c: Update.
5453         * inf-loop.c: Update.
5454         * inf-ptrace.c: Update.
5455         * infcall.c: Update.
5456         * infcmd.c: Update.
5457         * inflow.c: Update.
5458         * infrun.c: Update.
5459         * linux-fork.c: Update.
5460         * linux-nat.c: Update.
5461         * linux-thread-db.c: Update.
5462         * mi/mi-cmd-var.c: Update.
5463         * mi/mi-interp.c: Update.
5464         * mi/mi-main.c: Update.
5465         * nto-procfs.c: Update.
5466         * ppc-linux-tdep.c: Update.
5467         * procfs.c: Update.
5468         * python/py-inferior.c: Update.
5469         * python/py-record-btrace.c: Update.
5470         * python/py-record.c: Update.
5471         * ravenscar-thread.c: Update.
5472         * regcache.c: Update.
5473         * remote-sim.c: Update.
5474         * remote.c: Update.
5475         * sol-thread.c: Update.
5476         * solib.c: Update.
5477         * target.c: Update.
5478         * tui/tui-stack.c: Update.
5479         * varobj.c: Update.
5480         * windows-nat.c: Update.
5481         * windows-tdep.c: Update.
5482
5483 2018-07-03  Tom Tromey  <tom@tromey.com>
5484
5485         * common/ptid.c (ptid_match): Remove.
5486         * common/ptid.h (ptid_match): Don't declare.
5487         * fbsd-nat.c: Update.
5488         * infcmd.c: Update.
5489         * infrun.c: Update.
5490         * linux-nat.c: Update.
5491         * record-btrace.c: Update.
5492         * regcache.c: Update.
5493         * remote.c: Update.
5494
5495 2018-07-03  Tom Tromey  <tom@tromey.com>
5496
5497         * common/ptid.c (ptid_tid_p): Remove.
5498         * common/ptid.h (ptid_tid_p): Don't declare.
5499         * sol-thread.c: Update.
5500
5501 2018-07-03  Tom Tromey  <tom@tromey.com>
5502
5503         * common/ptid.c (ptid_lwp_p): Remove.
5504         * common/ptid.h (ptid_lwp_p): Don't declare.
5505         * fbsd-nat.c: Update.
5506         * linux-nat.c: Update.
5507         * nat/linux-procfs.c: Update.
5508         * nat/x86-linux-dregs.c: Update.
5509         * sol-thread.c: Update.
5510
5511 2018-07-03  Tom Tromey  <tom@tromey.com>
5512
5513         * common/ptid.c (ptid_is_pid): Remove.
5514         * common/ptid.h (ptid_is_pid): Don't declare.
5515         * infrun.c: Update.
5516         * linux-nat.c: Update.
5517         * mi/mi-interp.c: Update.
5518         * remote.c: Update.
5519         * thread.c: Update.
5520
5521 2018-07-03  Tom Tromey  <tom@tromey.com>
5522
5523         * common/ptid.c (ptid_get_tid): Remove.
5524         * common/ptid.h (ptid_get_tid): Don't declare.
5525         * ada-tasks.c: Update.
5526         * aix-thread.c: Update.
5527         * bsd-uthread.c: Update.
5528         * darwin-nat.c: Update.
5529         * fbsd-nat.c: Update.
5530         * i386-darwin-nat.c: Update.
5531         * infrun.c: Update.
5532         * linux-tdep.c: Update.
5533         * nto-procfs.c: Update.
5534         * ppc-ravenscar-thread.c: Update.
5535         * python/py-infthread.c: Update.
5536         * ravenscar-thread.c: Update.
5537         * sol-thread.c: Update.
5538         * sparc-ravenscar-thread.c: Update.
5539         * windows-nat.c: Update.
5540
5541 2018-07-03  Tom Tromey  <tom@tromey.com>
5542
5543         * common/ptid.c (ptid_get_lwp): Remove.
5544         * common/ptid.h (ptid_get_lwp): Don't declare.
5545         * aarch64-linux-nat.c: Update.
5546         * ada-tasks.c: Update.
5547         * aix-thread.c: Update.
5548         * amd64-linux-nat.c: Update.
5549         * arm-linux-nat.c: Update.
5550         * corelow.c: Update.
5551         * fbsd-nat.c: Update.
5552         * fbsd-tdep.c: Update.
5553         * gnu-nat.c: Update.
5554         * i386-cygwin-tdep.c: Update.
5555         * i386-gnu-nat.c: Update.
5556         * i386-linux-nat.c: Update.
5557         * ia64-linux-nat.c: Update.
5558         * inf-ptrace.c: Update.
5559         * infrun.c: Update.
5560         * linux-fork.c: Update.
5561         * linux-nat.c: Update.
5562         * linux-tdep.c: Update.
5563         * linux-thread-db.c: Update.
5564         * mips-linux-nat.c: Update.
5565         * nat/aarch64-linux-hw-point.c: Update.
5566         * nat/aarch64-linux.c: Update.
5567         * nat/linux-btrace.c: Update.
5568         * nat/linux-osdata.c: Update.
5569         * nat/linux-procfs.c: Update.
5570         * nat/x86-linux-dregs.c: Update.
5571         * obsd-nat.c: Update.
5572         * ppc-fbsd-nat.c: Update.
5573         * ppc-linux-nat.c: Update.
5574         * procfs.c: Update.
5575         * python/py-infthread.c: Update.
5576         * ravenscar-thread.c: Update.
5577         * remote.c: Update.
5578         * s390-linux-nat.c: Update.
5579         * sol-thread.c: Update.
5580         * sol2-tdep.c: Update.
5581         * spu-linux-nat.c: Update.
5582         * x86-linux-nat.c: Update.
5583         * xtensa-linux-nat.c: Update.
5584
5585 2018-07-03  Tom Tromey  <tom@tromey.com>
5586
5587         * common/ptid.c (ptid_get_pid): Remove.
5588         * common/ptid.h (ptid_get_pid): Don't declare.
5589         * aarch64-linux-nat.c: Update.
5590         * ada-lang.c: Update.
5591         * aix-thread.c: Update.
5592         * alpha-bsd-nat.c: Update.
5593         * amd64-fbsd-nat.c: Update.
5594         * amd64-linux-nat.c: Update.
5595         * arm-linux-nat.c: Update.
5596         * arm-nbsd-nat.c: Update.
5597         * auxv.c: Update.
5598         * break-catch-syscall.c: Update.
5599         * breakpoint.c: Update.
5600         * bsd-uthread.c: Update.
5601         * corelow.c: Update.
5602         * ctf.c: Update.
5603         * darwin-nat.c: Update.
5604         * fbsd-nat.c: Update.
5605         * fbsd-tdep.c: Update.
5606         * gcore.c: Update.
5607         * gnu-nat.c: Update.
5608         * hppa-nbsd-nat.c: Update.
5609         * hppa-obsd-nat.c: Update.
5610         * i386-fbsd-nat.c: Update.
5611         * ia64-linux-nat.c: Update.
5612         * inf-ptrace.c: Update.
5613         * infcmd.c: Update.
5614         * inferior.c: Update.
5615         * inferior.h: Update.
5616         * inflow.c: Update.
5617         * infrun.c: Update.
5618         * linux-fork.c: Update.
5619         * linux-nat.c: Update.
5620         * linux-tdep.c: Update.
5621         * linux-thread-db.c: Update.
5622         * m68k-bsd-nat.c: Update.
5623         * mi/mi-interp.c: Update.
5624         * mi/mi-main.c: Update.
5625         * mips-linux-nat.c: Update.
5626         * mips-nbsd-nat.c: Update.
5627         * mips64-obsd-nat.c: Update.
5628         * nat/aarch64-linux-hw-point.c: Update.
5629         * nat/aarch64-linux.c: Update.
5630         * nat/linux-btrace.c: Update.
5631         * nat/linux-osdata.c: Update.
5632         * nat/linux-procfs.c: Update.
5633         * nat/x86-linux-dregs.c: Update.
5634         * nto-procfs.c: Update.
5635         * obsd-nat.c: Update.
5636         * ppc-linux-nat.c: Update.
5637         * ppc-nbsd-nat.c: Update.
5638         * ppc-obsd-nat.c: Update.
5639         * proc-service.c: Update.
5640         * procfs.c: Update.
5641         * python/py-inferior.c: Update.
5642         * python/py-infthread.c: Update.
5643         * ravenscar-thread.c: Update.
5644         * record.c: Update.
5645         * remote-sim.c: Update.
5646         * remote.c: Update.
5647         * rs6000-nat.c: Update.
5648         * s390-linux-nat.c: Update.
5649         * sh-nbsd-nat.c: Update.
5650         * sol-thread.c: Update.
5651         * sparc-nat.c: Update.
5652         * sparc64-tdep.c: Update.
5653         * spu-linux-nat.c: Update.
5654         * spu-tdep.c: Update.
5655         * target-debug.h: Update.
5656         * target.c: Update.
5657         * thread.c: Update.
5658         * tid-parse.c: Update.
5659         * tracefile-tfile.c: Update.
5660         * vax-bsd-nat.c: Update.
5661         * windows-nat.c: Update.
5662         * x86-linux-nat.c: Update.
5663         * x86-nat.c: Update.
5664
5665 2018-07-03  Tom Tromey  <tom@tromey.com>
5666
5667         * common/ptid.c (pid_to_ptid): Remove.
5668         * common/ptid.h (pid_to_ptid): Don't declare.
5669         * aix-thread.c: Update.
5670         * arm-linux-nat.c: Update.
5671         * common/ptid.c: Update.
5672         * common/ptid.h: Update.
5673         * corelow.c: Update.
5674         * ctf.c: Update.
5675         * darwin-nat.c: Update.
5676         * fbsd-nat.c: Update.
5677         * fork-child.c: Update.
5678         * gnu-nat.c: Update.
5679         * go32-nat.c: Update.
5680         * inf-ptrace.c: Update.
5681         * infcmd.c: Update.
5682         * inferior.c: Update.
5683         * infrun.c: Update.
5684         * linux-fork.c: Update.
5685         * linux-nat.c: Update.
5686         * nat/aarch64-linux-hw-point.c: Update.
5687         * nat/fork-inferior.c: Update.
5688         * nat/x86-linux-dregs.c: Update.
5689         * nto-procfs.c: Update.
5690         * obsd-nat.c: Update.
5691         * procfs.c: Update.
5692         * progspace.c: Update.
5693         * remote.c: Update.
5694         * rs6000-nat.c: Update.
5695         * s390-linux-nat.c: Update.
5696         * sol-thread.c: Update.
5697         * spu-linux-nat.c: Update.
5698         * target.c: Update.
5699         * top.c: Update.
5700         * tracefile-tfile.c: Update.
5701         * windows-nat.c: Update.
5702
5703 2018-07-03  Tom Tromey  <tom@tromey.com>
5704
5705         * common/ptid.h (ptid_build): Don't declare.
5706         * common/ptid.c (ptid_build): Remove.
5707         * aix-thread.c: Update.
5708         * bsd-kvm.c: Update.
5709         * bsd-uthread.c: Update.
5710         * common/agent.c: Update.
5711         * common/ptid.c: Update.
5712         * common/ptid.h: Update.
5713         * corelow.c: Update.
5714         * darwin-nat.c: Update.
5715         * fbsd-nat.c: Update.
5716         * gnu-nat.c: Update.
5717         * linux-fork.c: Update.
5718         * linux-nat.c: Update.
5719         * linux-thread-db.c: Update.
5720         * nat/linux-osdata.c: Update.
5721         * nat/linux-procfs.c: Update.
5722         * nto-procfs.c: Update.
5723         * obsd-nat.c: Update.
5724         * proc-service.c: Update.
5725         * procfs.c: Update.
5726         * ravenscar-thread.c: Update.
5727         * remote-sim.c: Update.
5728         * remote.c: Update.
5729         * sol-thread.c: Update.
5730         * target.c: Update.
5731         * windows-nat.c: Update.
5732
5733 2018-07-03  Tom Tromey  <tom@tromey.com>
5734
5735         * infrun.c (follow_exec): Use exit_inferior_silent.
5736         * inferior.c (exit_inferior_num_silent): Remove.
5737         * inferior.h (exit_inferior_num_silent): Don't declare.
5738
5739 2018-07-03  Tom Tromey  <tom@tromey.com>
5740
5741         PR cli/23340:
5742         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5743         inferior_ptid on error.
5744
5745 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5746             Simon Marchi  <simon.marchi@polymtl.ca>
5747
5748         PR tdep/8282
5749         * disasm.h (gdb_disassembler): Add
5750         `m_disassembler_options_holder'. member
5751         * disasm.c (get_all_disassembler_options): New function.
5752         (gdb_disassembler::gdb_disassembler): Use it.
5753         (gdb_buffered_insn_length_init_dis): Likewise.
5754         (gdb_buffered_insn_length): Adjust accordingly.
5755         (set_disassembler_options): Handle options with arguments.
5756         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5757         line if showing options with descriptions.
5758         (disassembler_options_completer): Adapt to using the
5759         `disasm_options_and_args_t' structure.
5760         * mips-tdep.c (mips_disassembler_options): New variable.
5761         (mips_disassembler_options_o32): Likewise.
5762         (mips_disassembler_options_n32): Likewise.
5763         (mips_disassembler_options_n64): Likewise.
5764         (gdb_print_insn_mips): Don't set `disassembler_options'.
5765         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5766         functions.
5767         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5768         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5769         `gdbarch_disassembler_options_implicit' and
5770         `gdbarch_valid_disassembler_options'.
5771         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5772         `disasm_options_and_args_t' structure.
5773         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5774         method.
5775         (valid_disassembler_options): Switch from `disasm_options_t' to
5776         the `disasm_options_and_args_t' structure.
5777         * NEWS: Document `set disassembler-options' support for the MIPS
5778         target.
5779         * gdbarch.h: Regenerate.
5780         * gdbarch.c: Regenerate.
5781
5782 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5783
5784         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5785
5786 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5787
5788         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5789         parameter in call to amd64_target_description.
5790         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5791         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5792         (amd64fbsd_init_abi): Likewise.
5793         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5794         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5795         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5796         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5797
5798 2018-06-29  Pedro Alves  <palves@redhat.com>
5799
5800         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5801         "segments" parameter.
5802         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5803         (_initialize_amd64_tdep): Update call to
5804         amd64_create_target_description.
5805         (amd64_target_description): Add "segments" parameter.  Adjust
5806         the implementation to use it.
5807         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5808         call to amd64_create_target_description.
5809         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5810         * gdb/arch/amd64.h (amd64_create_target_description): Add
5811         "segments" register.
5812         * gdb/arch/amd64.c (amd64_create_target_description): Add
5813         "segments" parameter.  Call create_feature_i386_64bit_segments
5814         only if SEGMENTS is true.
5815         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5816         call to amd64_create_target_description.
5817
5818 2018-06-29  Pedro Alves  <palves@redhat.com>
5819
5820         * thread.c (thread_target_id_str): New, factored out from ...
5821         (print_thread_info_1): ... here.  Use it to compute the max
5822         "Target Id" column width.
5823
5824 2018-06-29  Pedro Alves  <palves@redhat.com>
5825
5826         * remote.c (remote_target::extra_thread_info): Delete
5827         'display_buf' and 'n' locals.  from the cache, regardless of
5828         packet mechanims is in use.  Use cache for qThreadExtra and qP
5829         methods too.
5830
5831 2018-06-29  Pedro Alves  <palves@redhat.com>
5832
5833         * blockframe.c (find_pc_sect_containing_function): New function.
5834         * breakpoint.c (print_breakpoint_location): Don't call
5835         find_pc_sect_function.
5836         * linespec.c (create_sals_line_offset): Record the location's
5837         symbol in the sal.
5838         * linespec.c (convert_address_location_to_sals): Fill in sal's
5839         symbol with find_pc_sect_containing_function.
5840         * symtab.c (find_function_start_sal): Rename to ...
5841         (find_function_start_sal_1): ... this.
5842         (find_function_start_sal): Reimplement as wrapper around
5843         find_function_start_sal_1, and use
5844         find_pc_sect_containing_function to fill in the sal's symbol.
5845         (find_function_start_sal(symbol*, bool)): Adjust.
5846         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5847         comments.
5848         (find_pc_sect_containing_function): Declare.
5849
5850 2018-06-29  Pedro Alves  <palves@redhat.com>
5851
5852         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5853         true if the the location has no symbol.
5854
5855 2018-06-28  Tom Tromey  <tom@tromey.com>
5856
5857         * NEWS: Mention --enable-codesign.
5858         * silent-rules.mk (ECHO_SIGN): New variable.
5859         * configure.ac: Add --enable-codesign.
5860         * configure: Rebuild.
5861         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5862         (gdb$(EXEEXT)): Optionally invoke codesign.
5863
5864 2018-06-28  Pedro Alves  <palves@redhat.com>
5865
5866         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5867         comments.
5868         (switch_to_thread_no_regs): Adjust comment.
5869         * infcmd.c (stop_pc): Delete.
5870         (post_create_inferior, info_program_command): Replace references
5871         to stop_pc with references to thread_info->suspend.stop_pc.
5872         * inferior.h (stop_pc): Delete declaration.
5873         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5874         (handle_inferior_event_1, handle_signal_stop)
5875         (process_event_stop_test, keep_going_stepped_thread)
5876         (handle_step_into_function, handle_step_into_function_backward)
5877         (print_stop_location): Replace references to stop_pc with
5878         references to thread_info->suspend.stop_pc.
5879         (struct infcall_suspend_state) <stop_pc>: Delete field.
5880         (save_infcall_suspend_state, restore_infcall_suspend_state):
5881         Remove references to inf_stat->stop_pc.
5882         * linux-fork.c (fork_load_infrun_state): Likewise.
5883         * record-btrace.c (record_btrace_set_replay): Likewise.
5884         * record-full.c (record_full_goto_entry): Likewise.
5885         * remote.c (print_one_stopped_thread): Likewise.
5886         * target.c (target_resume): Extend comment.
5887         * thread.c (set_executing_thread): New.
5888         (set_executing): Use it.
5889         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5890         Remove references to stop_pc.
5891
5892 2018-06-28  Pedro Alves  <palves@redhat.com>
5893
5894         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5895         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5896
5897 2018-06-28  Tom Tromey  <tom@tromey.com>
5898
5899         * coffread.c (coff_symfile_finish): Update.
5900         * xcoffread.c (xcoff_symfile_finish): Update.
5901         * elfread.c (elf_symfile_finish): Update.
5902         * symfile.h (dwarf2_free_objfile): Don't declare.
5903         * dwarf2read.c (_initialize_dwarf2_read): Use
5904         register_objfile_data_with_cleanup.
5905         (dwarf2_free_objfile): Now static.  Change signature.
5906
5907 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5908
5909         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5910         option "-o" to add-symbol-file-load to add an offset to each
5911         section's load address.
5912         * symfile.c (set_objfile_default_section_offset): New function.
5913
5914 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5915
5916         * symfile.c (add_symbol_file_command): Make sure that sections
5917         with the same name are sorted in the same order.
5918
5919 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5920
5921         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5922         require the second argument.  If omitted, load sections at the
5923         addresses specified in the file.
5924
5925 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5926
5927         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5928         (_initialize_symfile): Add option "-o" to symbol-file to add an
5929         offset to each section of the symbol file.
5930
5931 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5932
5933         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5934
5935 2018-06-27  Tom Tromey  <tom@tromey.com>
5936
5937         * stack.c (_initialize_stack): Update "func" help text.
5938
5939 2018-06-27  Tom Tromey  <tom@tromey.com>
5940
5941         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5942         std::vector.
5943         (unwind_infopy_str, pyuw_create_unwind_info)
5944         (unwind_infopy_add_saved_register, pyuw_sniffer)
5945         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5946         Update.
5947         (struct saved_reg): Add constructor.
5948         <value>: Now a gdbpy_ref<>.
5949
5950 2018-06-27  Tom Tromey  <tom@tromey.com>
5951
5952         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5953
5954 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5955
5956         * gdb-gdb.py.in: Format using autopep8.
5957
5958 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5959
5960         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5961         (type_lookup_function): Recognize CORE_ADDR values.
5962
5963 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5964
5965         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5966         print tag_name.
5967
5968 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5969
5970         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5971         <__lt__>: Add.
5972
5973 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5974
5975         * gdb-gdb.py: Move to...
5976         * gdb-gdb.py.in: ... here.
5977         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5978         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5979         dependencies.
5980         (distclean): Remove gdb-gdb.py when cleaning.
5981         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5982         * configure: Re-generate.
5983
5984 2018-06-27  Pedro Alves  <palves@redhat.com>
5985
5986         * proc-service.c (get_ps_regcache): New.
5987         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5988         (ps_lsetfpregs): Use it.
5989
5990 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5991
5992         PR gdb/21695
5993         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5994         (dwarf_decode_lines_1): Adjust.
5995
5996 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5997
5998         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5999         override.
6000         <info_proc>: Likewise.
6001
6002 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6003
6004         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6005         to windows_fetch_one_register, and only handle the case of
6006         fetching one register.  Move the code that reloads the context
6007         and iterates over all registers if R is negative to...
6008         (windows_nat_target::fetch_registers): ... here.
6009         (do_windows_store_inferior_registers): Rename to
6010         windows_store_one_register, and only handle the case of storing
6011         one register.  Move the code that handles the case where r is
6012         negative to...
6013         (windows_nat_target::store_registers) ... here.
6014
6015 2018-06-26  Tom Tromey  <tom@tromey.com>
6016
6017         PR rust/22574:
6018         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6019         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6020         Update.
6021         (rust_internal_print_type): Add podata parameter.
6022         (rust_print_type): Update.
6023
6024 2018-06-26  Tom Tromey  <tom@tromey.com>
6025
6026         * typeprint.h (struct print_offset_data) <update, finish,
6027         maybe_print_hole>: New methods.
6028         <indentation>: New constant.
6029         * typeprint.c (print_offset_data::indentation): Define.
6030         (print_offset_data::maybe_print_hole, print_offset_data::update)
6031         (print_offset_data::finish): Move from c-typeprint.c and rename.
6032         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6033         (print_spaces_filtered_with_print_options): Update.
6034         (c_print_type_union_field_offset, maybe_print_hole)
6035         (c_print_type_struct_field_offset): Move to typeprint.c and
6036         rename.
6037         (c_type_print_base_struct_union): Update.
6038
6039 2018-06-25  Pedro Alves  <palves@redhat.com>
6040
6041         * gdbthread.h (thread_info_ref, delete_thread)
6042         (delete_thread_silent, first_thread_of_inferior)
6043         (any_thread_of_inferior, switch_to_thread)
6044         (enable_thread_stack_temporaries)
6045         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6046         (get_last_thread_stack_temporary)
6047         (value_in_thread_stack_temporaries, can_access_registers_thread):
6048         Spell out "struct thread_info" instead of just "thread_info".
6049         * inferior.h (notice_new_inferior): Likewise.
6050
6051 2018-06-25  Pedro Alves  <palves@redhat.com>
6052
6053         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6054         pass thread_info pointer to delete_thread.
6055         (windows_nat_target::detach): Pass inferior pointer to
6056         detach_inferior.
6057         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6058         delete_thread.
6059         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6060         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6061         and pass a thread_info pointer to delete_thread.
6062         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6063         pass thread_info pointer to delete_thread.
6064         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6065         delete_thread_silent call.
6066         * procfs.c (procfs_target::detach): Pass inferior pointer to
6067         detach_inferior.
6068         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6069         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6070         delete_thread_silent call.
6071         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6072         pass thread_info pointer to delete_thread.
6073         (windows_nat_target::detach): Pass inferior pointer to
6074         delete_inferior.
6075
6076 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6077
6078         * regcache.c (readable_regcache::read_part): Fix asserts.
6079         (reg_buffer::raw_collect_part): New function.
6080         (regcache::write_part): Fix asserts.
6081         (reg_buffer::raw_supply_part): New function.
6082         (regcache::transfer_regset_register): New helper function.
6083         (regcache::transfer_regset): Call new functions.
6084         (regcache_supply_regset): Use gdb_byte*.
6085         (regcache::supply_regset): Likewise.
6086         (regcache_collect_regset): Likewise.
6087         (regcache::collect_regset): Likewise.
6088         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6089         (reg_buffer::raw_supply_part): Likewise.
6090         (regcache::transfer_regset_register): Likewise.
6091         (regcache::transfer_regset): Use gdb_byte*.
6092
6093 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6094
6095         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6096
6097 2018-06-21  Pedro Alves  <palves@redhat.com>
6098
6099         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6100         instead of a ptid_t.  All callers adjusted.
6101         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6102         adjusted.
6103         (print_ada_task_info, display_current_task_id, task_command_1):
6104         Adjust.
6105         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6106         inferior_thread.
6107         (breakpoint_kind): Adjust.
6108         (remove_breakpoints_pid): Rename to ...
6109         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6110         pointer.  All callers adjusted.
6111         (bpstat_clear_actions): Use inferior_thread.
6112         (get_bpstat_thread): New.
6113         (bpstat_do_actions): Use it.
6114         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6115         to take a thread_info pointer.  All callers adjusted.
6116         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6117         (breakpoint_re_set_thread): Use inferior_thread.
6118         * breakpoint.h (struct inferior): Forward declare.
6119         (bpstat_stop_status): Update.
6120         (remove_breakpoints_pid): Delete.
6121         (remove_breakpoints_inf): New.
6122         * bsd-uthread.c (bsd_uthread_target::wait)
6123         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6124         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6125         (maint_btrace_packet_history_cmd)
6126         (maint_btrace_clear_packet_history_cmd): Adjust.
6127         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6128         inferior_thread.
6129         * cli/cli-interp.c: Include "inferior.h".
6130         * common/refcounted-object.h (struct
6131         refcounted_object_ref_policy): New.
6132         * compile/compile-object-load.c: Include gdbthread.h.
6133         (store_regs): Use inferior_thread.
6134         * corelow.c (core_target::close): Use current_inferior.
6135         (core_target_open): Adjust to use first_thread_of_inferior and use
6136         the current inferior.
6137         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6138         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6139         <thread>: ... this new field.  All references adjusted.
6140         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6141         Take a thread_info pointer instead of a ptid_t.
6142         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6143         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6144         thread_info pointer instead of a ptid_t.
6145         * elfread.c: Include "inferior.h".
6146         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6147         Use inferior_thread.
6148         * eval.c (evaluate_subexp): Likewise.
6149         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6150         inferior_thread.
6151         * gdb_proc_service.h (struct thread_info): Forward declare.
6152         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6153         <thread>: ... this new field.  All references adjusted.
6154         * gdbarch.h, gdbarch.c: Regenerate.
6155         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6156         'thread' parameter.  All implementations and callers adjusted.
6157         * gdbthread.h (thread_info) <set_running>: New method.
6158         (delete_thread, delete_thread_silent): Take a thread_info pointer
6159         instead of a ptid.
6160         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6161         (first_thread_of_process): Delete, replaced by ...
6162         (first_thread_of_inferior): ... this new function.  All callers
6163         adjusted.
6164         (any_live_thread_of_process): Delete, replaced by ...
6165         (any_live_thread_of_inferior): ... this new function.  All callers
6166         adjusted.
6167         (switch_to_thread, switch_to_no_thread): Declare.
6168         (is_executing): Delete.
6169         (enable_thread_stack_temporaries): Update comment.
6170         <enable_thread_stack_temporaries>: Take a thread_info pointer
6171         instead of a ptid_t.  Incref the thread.
6172         <~enable_thread_stack_temporaries>: Decref the thread.
6173         <m_ptid>: Delete
6174         <m_thr>: New.
6175         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6176         (get_last_thread_stack_temporary)
6177         (value_in_thread_stack_temporaries, can_access_registers_thread):
6178         Take a thread_info pointer instead of a ptid_t.  All callers
6179         adjusted.
6180         * infcall.c (get_call_return_value): Use inferior_thread.
6181         (run_inferior_call): Work with thread pointers instead of ptid_t.
6182         (call_function_by_hand_dummy): Work with thread pointers instead
6183         of ptid_t.  Use thread_info_ref.
6184         * infcmd.c (proceed_thread_callback): Access thread's state
6185         directly.
6186         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6187         access thread's state directly.
6188         (continue_command): Use inferior_thread.
6189         (info_program_command): Use find_thread_ptid and access thread
6190         state directly.
6191         (proceed_after_attach_callback): Use thread state directly.
6192         (notice_new_inferior): Take a thread_info pointer instead of a
6193         ptid_t.  All callers adjusted.
6194         (exit_inferior): Take an inferior pointer instead of a pid.  All
6195         callers adjusted.
6196         (exit_inferior_silent): New.
6197         (detach_inferior): Delete.
6198         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6199         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6200         (detach_inferior_command, kill_inferior_command): Use
6201         find_inferior_id instead of valid_gdb_inferior_id and
6202         gdb_inferior_id_to_pid.
6203         (inferior_command): Use inferior and thread pointers.
6204         * inferior.h (struct thread_info): Forward declare.
6205         (notice_new_inferior): Take a thread_info pointer instead of a
6206         ptid_t.  All callers adjusted.
6207         (detach_inferior): Delete declaration.
6208         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6209         instead of a pid.  All callers adjusted.
6210         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6211         (valid_gdb_inferior_id): Delete.
6212         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6213         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6214         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6215         ...
6216         <inf>: ... this new field.
6217         <step_ptid>: Delete, replaced by ...
6218         <step_thread>: ... this new field.
6219         (get_displaced_stepping_state): Take an inferior pointer instead
6220         of a pid.  All callers adjusted.
6221         (displaced_step_in_progress_any_inferior): Adjust.
6222         (displaced_step_in_progress_thread): Take a thread pointer instead
6223         of a ptid_t.  All callers adjusted.
6224         (displaced_step_in_progress, add_displaced_stepping_state): Take
6225         an inferior pointer instead of a pid.  All callers adjusted.
6226         (get_displaced_step_closure_by_addr): Adjust.
6227         (remove_displaced_stepping_state): Take an inferior pointer
6228         instead of a pid.  All callers adjusted.
6229         (displaced_step_prepare_throw, displaced_step_prepare)
6230         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6231         All callers adjusted.
6232         (start_step_over): Adjust.
6233         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6234         displaced step queue.
6235         (do_target_resume): Adjust.
6236         (fetch_inferior_event): Use inferior_thread.
6237         (context_switch, get_inferior_stop_soon): Take an
6238         execution_control_state pointer instead of a ptid_t.  All callers
6239         adjusted.
6240         (switch_to_thread_cleanup): Delete.
6241         (stop_all_threads): Use scoped_restore_current_thread.
6242         * inline-frame.c: Include "gdbthread.h".
6243         (inline_state) <inline_state>: Take a thread pointer instead of a
6244         ptid_t.  All callers adjusted.
6245         <ptid>: Delete, replaced by ...
6246         <thread>: ... this new field.
6247         (find_inline_frame_state): Take a thread pointer instead of a
6248         ptid_t.  All callers adjusted.
6249         (skip_inline_frames, step_into_inline_frame)
6250         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6251         pointer instead of a ptid_t.  All callers adjusted.
6252         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6253         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6254         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6255         pointers directly.
6256         * linux-nat.c (get_detach_signal): Likewise.
6257         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6258         (thread_db_notice_clone): Adjust.
6259         (thread_db_find_new_threads_silently)
6260         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6261         a thread pointer instead of a ptid_t.  All callers adjusted.
6262         * mi/mi-cmd-var.c: Include "inferior.h".
6263         (mi_cmd_var_update_iter): Update to use thread pointers.
6264         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6265         inferior directly.
6266         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6267         out to ...
6268         (mi_output_running): ... this new function.
6269         (mi_on_resume_1): Adjust to use it.
6270         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6271         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6272         directly.
6273         (interrupt_thread_callback): : Adjust to use thread and inferior
6274         pointers.
6275         * proc-service.c: Include "gdbthread.h".
6276         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6277         * progspace-and-thread.c: Include "inferior.h".
6278         * progspace.c: Include "inferior.h".
6279         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6280         hold a reference to an inferior_object.
6281         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6282         inferior_thread.
6283         * python/py-inferior.c (struct inferior_object): Give the type a
6284         tag name instead of a typedef.
6285         (python_on_normal_stop): No need to check if the current thread is
6286         listed.
6287         (inferior_to_inferior_object): Change return type to
6288         inferior_object.  All callers adjusted.
6289         (find_thread_object): Delete, bits factored out to ...
6290         (thread_to_thread_object): ... this new function.
6291         * python/py-infthread.c (create_thread_object): Use
6292         inferior_to_inferior_object.
6293         (thpy_is_stopped): Use thread pointer directly.
6294         (gdbpy_selected_thread): Use inferior_thread.
6295         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6296         field, replaced with ...
6297         <thread>: ... this new field.  All users adjusted.
6298         (btpy_insn_or_gap_new): Drop const.
6299         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6300         callers adjusted.
6301         * python/py-record.c: Include "gdbthread.h".
6302         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6303         a ptid_t.  All callers adjusted.
6304         (gdbpy_current_recording): Use inferior_thread.
6305         * python/py-record.h (recpy_record_object) <ptid>: Delete
6306         field, replaced with ...
6307         <thread>: ... this new field.  All users adjusted.
6308         (recpy_element_object) <ptid>: Delete
6309         field, replaced with ...
6310         <thread>: ... this new field.  All users adjusted.
6311         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6312         a ptid_t.  All callers adjusted.
6313         * python/py-threadevent.c: Include "gdbthread.h".
6314         (get_event_thread): Use thread_to_thread_object.
6315         * python/python-internal.h (struct inferior_object): Forward
6316         declare.
6317         (find_thread_object, find_inferior_object): Delete declarations.
6318         (thread_to_thread_object, inferior_to_inferior_object): New
6319         declarations.
6320         * record-btrace.c: Include "inferior.h".
6321         (require_btrace_thread): Use inferior_thread.
6322         (record_btrace_frame_sniffer)
6323         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6324         (get_thread_current_frame): Use scoped_restore_current_thread and
6325         switch_to_thread.
6326         (get_thread_current_frame): Use thread pointer directly.
6327         (record_btrace_replay_at_breakpoint): Use thread's inferior
6328         pointer directly.
6329         * record-full.c: Include "inferior.h".
6330         * regcache.c: Include "gdbthread.h".
6331         (get_thread_arch_regcache): Use the inferior's address space
6332         directly.
6333         (get_thread_regcache, registers_changed_thread): New.
6334         * regcache.h (get_thread_regcache(thread_info *thread)): New
6335         overload.
6336         (registers_changed_thread): New.
6337         (remote_target) <remote_detach_1>: Swap order of parameters.
6338         (remote_add_thread): <remote_add_thread>: Return the new thread.
6339         (get_remote_thread_info(ptid_t)): New overload.
6340         (remote_target::remote_notice_new_inferior): Use thread pointers
6341         directly.
6342         (remote_target::process_initial_stop_replies): Use
6343         thread_info::set_running.
6344         (remote_target::remote_detach_1, remote_target::detach)
6345         (extended_remote_target::detach): Adjust.
6346         * stack.c (frame_show_address): Use inferior_thread.
6347         * target-debug.h (target_debug_print_thread_info_pp): New.
6348         * target-delegates.c: Regenerate.
6349         * target.c (default_thread_address_space): Delete.
6350         (memory_xfer_partial_1): Use current_inferior.
6351         (target_detach): Use current_inferior.
6352         (target_thread_address_space): Delete.
6353         (generic_mourn_inferior): Use current_inferior.
6354         * target.h (struct target_ops) <thread_address_space>: Delete.
6355         (target_thread_address_space): Delete.
6356         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6357         pointers directly.
6358         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6359         thread pointer instead of a ptid_t.  Adjust all callers.
6360         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6361         (first_thread_of_process): Delete, replaced by ...
6362         (first_thread_of_inferior): ... this new function.  All callers
6363         adjusted.
6364         (any_thread_of_process): Rename to ...
6365         (any_thread_of_inferior): ... this, and take an inferior pointer.
6366         (any_live_thread_of_process): Rename to ...
6367         (any_live_thread_of_inferior): ... this, and take an inferior
6368         pointer.
6369         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6370         (value_in_thread_stack_temporaries)
6371         (get_last_thread_stack_temporary): Take a thread pointer instead
6372         of a ptid_t.  Adjust all callers.
6373         (thread_info::set_running): New.
6374         (validate_registers_access): Use inferior_thread.
6375         (can_access_registers_ptid): Rename to ...
6376         (can_access_registers_thread): ... this, and take a thread
6377         pointer.
6378         (print_thread_info_1): Adjust to compare thread pointers instead
6379         of ptids.
6380         (switch_to_no_thread, switch_to_thread): Make extern.
6381         (scoped_restore_current_thread::~scoped_restore_current_thread):
6382         Use m_thread pointer directly.
6383         (scoped_restore_current_thread::scoped_restore_current_thread):
6384         Use inferior_thread.
6385         (thread_command): Use thread pointer directly.
6386         (thread_num_make_value_helper): Use inferior_thread.
6387         * top.c (execute_command): Use inferior_thread.
6388         * tui/tui-interp.c: Include "inferior.h".
6389         * varobj.c (varobj_create): Use inferior_thread.
6390         (value_of_root_1): Use find_thread_global_id instead of
6391         global_thread_id_to_ptid.
6392
6393 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6394
6395         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6396         possible.
6397         (regcache::write_part): Likewise.
6398         (readable_regcache::cooked_read_part): Update comment.
6399         (readable_regcache::cooked_write_part): Likewise.
6400         * regcache.h: (readable_regcache::read_part): Likewise.
6401         (regcache::write_part): Likewise.
6402
6403 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6404             Dirk Schubert  <dirk.schubert@arm.com>
6405
6406         * aarch64-linux-nat.c (post_attach): New.
6407         (aarch64_linux_nat_target::post_attach): Override post_attach to
6408         record the number of hardware debug registers.
6409
6410 2018-06-20  Tom Tromey  <tom@tromey.com>
6411
6412         * python/py-param.c (add_setshow_generic): Make parameters const.
6413         (parmpy_init): Update.
6414
6415 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6416
6417         * regcache.h (regcache_cooked_read_ftype): Rename to...
6418         (register_read_ftype): ...this, change type to function_view.
6419         (class reg_buffer) <save>: Remove src parameter.
6420         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6421         parameter non-const in first overload.  Remove src parameter in
6422         second overload.
6423         * regcache.c (do_cooked_read): Remove.
6424         (readonly_detached_regcache::readonly_detached_regcache): Make
6425         parameter non-const, adjust call to other constructor.
6426         (reg_buffer::save): Remove src parameter.
6427         * frame.c (do_frame_register_read): Remove.
6428         (frame_save_as_regcache): Use lambda function.
6429         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6430         parameter to ppu2spu_data *.
6431         (ppu2spu_sniffer): Use lambda function.
6432
6433 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6434
6435         * record-full.c (record_full_target::insert_breakpoint): Remove
6436         "struct" keyword, add const.
6437
6438 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6439
6440         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6441         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6442         * configure.ac: Remove AC_PREREQ, add missing quoting.
6443         * gnulib/configure.ac: Modernize usage of
6444         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6445         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6446         (AUTOMAKE_VERSION): Bump to 1.15.1.
6447         * configure: Re-generate.
6448         * config.in: Re-generate.
6449         * aclocal.m4: Re-generate.
6450         * gnulib/aclocal.m4: Re-generate.
6451         * gnulib/config.in: Re-generate.
6452         * gnulib/configure: Re-generate.
6453         * gnulib/import/Makefile.in: Re-generate.
6454
6455 2018-06-19  Pedro Alves  <palves@redhat.com>
6456
6457         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6458         (lookup_minimal_symbol_by_pc_section): ... here with
6459         gdb_assert_not_reached added.
6460
6461 2018-06-19  Pedro Alves  <palves@redhat.com>
6462
6463         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6464         parameter with a block parameter.  Compare location's block symbol
6465         with the frame's block instead of addresses.
6466         (skip_inline_frames): Pass the current block instead of the
6467         frame's address.  Break out as soon as we determine the frame
6468         should not be skipped.
6469
6470 2018-06-18  Tom Tromey  <tom@tromey.com>
6471
6472         * solib-aix.c (solib_aix_get_section_offsets): Return
6473         unique_xmalloc_ptr.
6474         (solib_aix_solib_create_inferior_hook): Update.
6475
6476 2018-06-18  Tom Tromey  <tom@tromey.com>
6477
6478         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6479
6480 2018-06-18  Tom Tromey  <tom@tromey.com>
6481
6482         * solib-frv.c (frv_relocate_main_executable): Use
6483         unique_xmalloc_ptr.
6484         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6485         unique_xmalloc_ptr.
6486
6487 2018-06-18  Tom Tromey  <tom@tromey.com>
6488
6489         * objfiles.h (inhibit_section_map_updates): Update.
6490         (resume_section_map_updates, resume_section_map_updates_cleanup):
6491         Remove.
6492         * solib-svr4.c (svr4_handle_solib_event): Update.
6493         * objfiles.c (inhibit_section_map_updates): Return
6494         scoped_restore_tmpl<int>.
6495         (resume_section_map_updates, resume_section_map_updates_cleanup):
6496         Remove.
6497
6498 2018-06-18  Tom Tromey  <tom@tromey.com>
6499
6500         * valprint.h (read_string): Update.
6501         * valprint.c (read_string): Change type of "buffer".
6502         (val_print_string): Update.
6503         * python/py-value.c (valpy_string): Update.
6504         * language.h (struct language_defn) <la_get_string>: Change
6505         type of "buffer".
6506         (default_get_string, c_get_string): Update.
6507         * language.c (default_get_string): Change type of "buffer".
6508         * guile/scm-value.c (gdbscm_value_to_string): Update.
6509         * c-lang.c (c_get_string): Change type of "buffer".
6510
6511 2018-06-18  Tom Tromey  <tom@tromey.com>
6512
6513         * ser-mingw.c (struct pipe_state_destroyer): New.
6514         (pipe_state_up): New typedef.
6515         (cleanup_pipe_state): Remove.
6516         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6517
6518 2018-06-18  Tom Tromey  <tom@tromey.com>
6519
6520         * rust-lang.h (rust_yyerror): Don't declare.
6521         * rust-lang.c (rust_language_defn): Update.
6522         * rust-exp.y (yyerror): Now static.
6523         * parse.c (parse_exp_in_context_1): Update.
6524         * p-lang.h (p_yyerror): Don't declare.
6525         * p-lang.c (p_language_defn): Update.
6526         * p-exp.y (yyerror): Now static.
6527         * opencl-lang.c (opencl_language_defn): Update.
6528         * objc-lang.c (objc_language_defn): Update.
6529         * m2-lang.h (m2_yyerror): Don't declare.
6530         * m2-lang.c (m2_language_defn): Update.
6531         * m2-exp.y (yyerror): Now static.
6532         * language.h (struct language_defn) <la_error>: Remove.
6533         * language.c (unk_lang_error): Remove.
6534         (unknown_language_defn, auto_language_defn): Remove.
6535         * go-lang.h (go_yyerror): Don't declare.
6536         * go-lang.c (go_language_defn): Update.
6537         * go-exp.y (yyerror): Now static.
6538         * f-lang.h (f_yyerror): Don't declare.
6539         * f-lang.c (f_language_defn): Update.
6540         * f-exp.y (yyerror): Now static.
6541         * d-lang.h (d_yyerror): Don't declare.
6542         * d-lang.c (d_language_defn): Update.
6543         * d-exp.y (yyerror): Now static.
6544         * c-lang.h (c_yyerror): Don't declare.
6545         * c-lang.c (c_language_defn, cplus_language_defn)
6546         (asm_language_defn, minimal_language_defn): Update.
6547         * c-exp.y (yyerror): Now static.
6548         * ada-lang.h (ada_yyerror): Don't declare.
6549         * ada-lang.c (ada_language_defn): Update.
6550         * ada-exp.y (yyerror): Now static.
6551
6552 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6553
6554         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6555         (store_sveregs_to_thread): Likewise.
6556         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6557         (aarch64_linux_store_inferior_registers): Likewise.
6558         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6559         function.
6560         (aarch64_sve_regs_copy_to_regcache): Likewise.
6561         (aarch64_sve_regs_copy_from_regcache): Likewise.
6562         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6563         declaration.
6564         (aarch64_sve_regs_copy_to_regcache): Likewise.
6565         (aarch64_sve_regs_copy_from_regcache): Likewise.
6566         (sve_context): Structure from Linux headers.
6567         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6568         (SVE_SIG_ZREG_SIZE): Likewise.
6569         (SVE_SIG_PREG_SIZE): Likewise.
6570         (SVE_SIG_FFR_SIZE): Likewise.
6571         (SVE_SIG_REGS_OFFSET): Likewise.
6572         (SVE_SIG_ZREGS_OFFSET): Likewise.
6573         (SVE_SIG_ZREG_OFFSET): Likewise.
6574         (SVE_SIG_ZREGS_SIZE): Likewise.
6575         (SVE_SIG_PREGS_OFFSET): Likewise.
6576         (SVE_SIG_PREG_OFFSET): Likewise.
6577         (SVE_SIG_PREGS_SIZE): Likewise.
6578         (SVE_SIG_FFR_OFFSET): Likewise.
6579         (SVE_SIG_REGS_SIZE): Likewise.
6580         (SVE_SIG_CONTEXT_SIZE): Likewise.
6581         (SVE_PT_REGS_MASK): Likewise.
6582         (SVE_PT_REGS_FPSIMD): Likewise.
6583         (SVE_PT_REGS_SVE): Likewise.
6584         (SVE_PT_VL_INHERIT): Likewise.
6585         (SVE_PT_VL_ONEXEC): Likewise.
6586         (SVE_PT_REGS_OFFSET): Likewise.
6587         (SVE_PT_FPSIMD_OFFSET): Likewise.
6588         (SVE_PT_FPSIMD_SIZE): Likewise.
6589         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6590         (SVE_PT_SVE_PREG_SIZE): Likewise.
6591         (SVE_PT_SVE_FFR_SIZE): Likewise.
6592         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6593         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6594         (__SVE_SIG_TO_PT): Likewise.
6595         (SVE_PT_SVE_OFFSET): Likewise.
6596         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6597         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6598         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6599         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6600         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6601         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6602         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6603         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6604         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6605         (SVE_PT_SVE_SIZE): Likewise.
6606         (SVE_PT_SIZE): Likewise.
6607         (HAS_SVE_STATE): New define.
6608
6609 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6610
6611         * nat/aarch64-sve-linux-sigcontext.h: New file.
6612         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6613         new files.
6614         (SVE_VQ_MIN): Likewise.
6615         (SVE_VQ_MAX): Likewise.
6616         (SVE_VL_MIN): Likewise.
6617         (SVE_VL_MAX): Likewise.
6618         (SVE_NUM_ZREGS): Likewise.
6619         (SVE_NUM_PREGS): Likewise.
6620         (sve_vl_valid): Likewise.
6621         (struct user_sve_header): Likewise.
6622
6623 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6624             Richard Bunt <Richard.Bunt@arm.com>
6625
6626         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6627         was requested by GDB.
6628
6629 2018-06-15  Tom de Vries  <tdevries@suse.de>
6630
6631         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6632
6633 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6634
6635         * gnulib/update-gnulib.sh: Print expected versions of
6636         autoconf/aclocal.
6637
6638 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6639
6640         * arch-utils.c (default_type_align): Use type_length_units.
6641         * gdbtypes.c (type_align): Use type_length_units.
6642
6643 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6644
6645         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6646         of 'define' command.
6647
6648 2018-06-14  Tom de Vries  <tdevries@suse.de>
6649
6650         PR cli/22573
6651         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6652         get_no_prettyformat_print_options.
6653
6654 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6655
6656         * sparc-nat.h: Include target.h.
6657         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6658         <fetch_registers>: Remove this argument in function call.
6659         <store_registers>: Remove this argument in function call, remove
6660         extra semicolon.
6661         <low_forget_process>: Call sparc64_forget_process instead of
6662         sparc_forget_process.
6663
6664 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6665
6666         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6667         (procfs_target::make_corefile_notes): Adjust to new
6668         target_read_alloc return type.
6669
6670 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6671             Stephen Roberts  <stephen.roberts@arm.com>
6672
6673         PR gdb/22882
6674         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6675         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6676         Move should_notify_stop local into more inner scope.
6677
6678 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6679             Stephen Roberts  <stephen.roberts@arm.com>
6680
6681         PR gdb/22882
6682         * infrun.c (resume_1): Add call to mark_async_event_handler.
6683
6684 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6685
6686         * infrun.c (do_target_wait): Change old version of $pc printed.
6687
6688 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6689
6690         * dwarf2read.c (read_index_from_section): Rename to...
6691         (read_gdb_index_from_section): ... this, update all callers.
6692         (dwarf2_read_index): Rename to...
6693         (dwarf2_read_gdb_index): ... this, update all callers.
6694
6695 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6696
6697         * gdb/hppa-linux-nat.c
6698         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6699         hppa_linux_nat_target::fetch_registers.
6700
6701 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6702
6703         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6704         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6705         (AARCH64_DWARF_SVE_FFR): Likewise.
6706         (AARCH64_DWARF_SVE_P0): Likewise.
6707         (AARCH64_DWARF_SVE_Z0): Likewise.
6708
6709 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6710
6711         * common/common-regcache.h (raw_compare): New function.
6712         * regcache.c (regcache::raw_compare): Likewise.
6713         * regcache.h (regcache::raw_compare): New declaration.
6714
6715 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6716
6717         * common/common-regcache.h (reg_buffer_common): New structure.
6718         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6719         (reg_buffer::raw_supply): Likewise.
6720         (reg_buffer::raw_supply_integer): Likewise.
6721         (reg_buffer::raw_supply_zeroed): Likewise.
6722         (reg_buffer::raw_collect): Likewise.
6723         (reg_buffer::raw_collect_integer): Likewise.
6724         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6725         (reg_buffer::raw_supply): Likewise.
6726         (reg_buffer::raw_supply_integer): Likewise.
6727         (reg_buffer::raw_supply_zeroed): Likewise.
6728         (reg_buffer::raw_collect): Likewise.
6729         (reg_buffer::raw_collect_integer): Likewise.
6730
6731 2018-06-10  Tom Tromey  <tom@tromey.com>
6732
6733         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6734         (class remote_state) <stop_reply_queue>: Now std::vector.
6735         (remote_state::~remote_state)
6736         (remote_target::stop_reply_queue_length): Update.
6737         (struct queue_iter_param, remove_child_of_pending_fork)
6738         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6739         (check_pending_event_prevents_wildcard_vcont_callback)
6740         (remove_stop_reply_for_inferior)
6741         (remove_stop_reply_of_remote_state)
6742         (remote_notif_remove_once_on_match)
6743         (stop_reply_match_ptid_and_ws)
6744         (remote_kill_child_of_pending_fork): Remove.
6745         (remote_target::remove_new_fork_children)
6746         (remote_target::check_pending_events_prevent_wildcard_vcont)
6747         (remote_target::discard_pending_stop_replies)
6748         (remote_target::discard_pending_stop_replies_in_queue)
6749         (remote_target::remote_notif_remove_queued_reply)
6750         (remote_target::queued_stop_reply)
6751         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6752         (remote_target::wait, remote_target::kill_new_fork_children)
6753         (remote_target::async): Update.
6754
6755 2018-06-10  Tom Tromey  <tom@tromey.com>
6756
6757         * record-full.c (record_full_arch_list_cleanups): Remove.
6758         (record_full_message): Use try/catch.
6759         (record_full_wait_cleanups): Remove.
6760         (record_full_wait_1): Use try/catch.
6761         (record_full_restore): Likewise.
6762
6763 2018-06-10  Tom Tromey  <tom@tromey.com>
6764
6765         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6766         declare VEC.  Add constructor.
6767         <in_target_beneath>: Now bool.
6768         (record_full_breakpoints): Now a std::vector, static.
6769         (record_full_sync_record_breakpoints)
6770         (record_full_init_record_breakpoints)
6771         (record_full_target::insert_breakpoint)
6772         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6773
6774 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6775
6776         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6777         * serial.c (serial_interface_lookup): Remove struct keyword.
6778
6779 2018-06-10  Tom Tromey  <tom@tromey.com>
6780
6781         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6782         method.
6783         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6784         a method.
6785         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6786         method.
6787         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6788         "beneath" as a method.
6789         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6790         Use "beneath" as a method.
6791
6792 2018-06-10  Tom Tromey  <tom@tromey.com>
6793
6794         * tracefile.c (struct trace_file_writer_deleter): New.
6795         <operator()>: Rename from trace_file_writer_xfree.
6796         (trace_file_writer_up): New typedef.
6797         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6798
6799 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6800
6801         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6802         <m_registers, m_register_status>: Change type to
6803         std::unique_ptr.
6804         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6805         XCNEWVEC.
6806
6807 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6808
6809         * common/common-regcache.h (enum register_status): Add
6810         underlying type "signed char".
6811         * regcache.h (reg_buffer) <m_register_status>: Change type to
6812         register_status *.
6813         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6814         register_status instead of signed char.
6815         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6816         (reg_buffer::get_register_status): Remove cast.
6817         (readable_regcache::raw_read): Remove cast.
6818         (readable_regcache::cooked_read): Remove cast.
6819
6820 2018-06-09  Tom Tromey  <tom@tromey.com>
6821
6822         * source.c (reverse_search_command, forward_search_command): Use
6823         scoped_fd.
6824
6825 2018-06-09  Tom Tromey  <tom@tromey.com>
6826
6827         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6828         (serial_ops_list): Now static, std::vector.
6829         (serial_interface_lookup, serial_add_interface): Update.
6830
6831 2018-06-09  Tom Tromey  <tom@tromey.com>
6832
6833         * dwarf2read.c (process_cu_includes): Update.
6834         (process_full_comp_unit): Update.
6835         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6836         std::vector.
6837
6838 2018-06-08  Paul Koning  <paul_koning@dell.com>
6839
6840         PR gdb/23252
6841
6842         * python/python.c (do_start_initialization):
6843         Avoid call to internal Python API.
6844         (init__gdb_module): New function.
6845
6846 2018-06-08  Gary Benson <gbenson@redhat.com>
6847
6848         * linux-thread-db.c (valprint.h): New include.
6849         (struct check_thread_db_info): New structure.
6850         (check_thread_db_on_load, tdb_testinfo): New static globals.
6851         (check_thread_db, check_thread_db_callback): New functions.
6852         (try_thread_db_load_1): Run integrity checks if requested.
6853         (maintenance_check_libthread_db): New function.
6854         (_initialize_thread_db): Register "maint check libthread-db"
6855         and "maint set/show check-libthread-db".
6856         * NEWS: Mention the above new commands.
6857
6858 2018-06-08  Tom Tromey  <tom@tromey.com>
6859
6860         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6861         now a method.
6862
6863 2018-06-08  Tom Tromey  <tom@tromey.com>
6864
6865         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6866
6867 2018-06-08  Tom Tromey  <tom@tromey.com>
6868
6869         * common/btrace-common.h (struct btrace_data): Add constructor,
6870         destructor, move assignment operator.
6871         <empty, clear, fini>: New methods.
6872         <format>: Initialize.
6873         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6874         (btrace_data_empty): Don't declare.
6875         * common/btrace-common.c (btrace_data_init): Remove.
6876         (btrace_data::fini): Rename from btrace_data_fini.
6877         (btrace_data::empty): Rename from btrace_data_empty.
6878         (btrace_data::clear): Rename from btrace_data_clear.  Return
6879         bool.
6880         * btrace.h (make_cleanup_btrace_data): Don't declare.
6881         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6882         (parse_xml_btrace): Update.
6883         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6884         (maint_btrace_clear_packet_history_cmd): Update.
6885
6886 2018-06-07  Pedro Alves  <palves@redhat.com>
6887
6888         * target.h (target_ops) <beneath>: Now a method.  All references
6889         updated.
6890         (class target_stack): New.
6891         * target.c (g_target_stack): New.
6892         (g_current_top_target): Delete.
6893         (current_top_target): Get the top target out of g_target_stack.
6894         (target_stack::push, target_stack::unpush): New.
6895         (push_target, unpush_target): Reimplement.
6896         (target_is_pushed): Reimplement in terms of g_target_stack.
6897         (target_ops::beneath, target_stack::find_beneath): New.
6898
6899 2018-06-07  Pedro Alves  <palves@redhat.com>
6900
6901         * target.h (find_target_beneath): Delete declaration.
6902         * target.c (find_target_beneath): Delete definition.
6903         * aix-thread.c: All callers of find_target_beneath adjusted to
6904         call target_ops::beneath instead.
6905         * bsd-uthread.c: Likewise.
6906         * linux-thread-db.c: Likewise.
6907         * ravenscar-thread.c: Likewise.
6908         * sol-thread.c: Likewise.
6909         * spu-multiarch.c: Likewise.
6910
6911 2018-06-07  Pedro Alves  <palves@redhat.com>
6912
6913         * target.h (target_ops) <beneath>: Now a method.  All references
6914         updated.
6915         (target_ops) <m_beneath>: New.
6916         * target.c (target_ops::beneath): New.
6917         * corelow.c: Adjust all references to target_ops::beneath.
6918         * linux-thread-db.c: Likewise.
6919         * make-target-delegates: Likewise.
6920         * record-btrace.c: Likewise.
6921         * record-full.c: Likewise.
6922         * remote.c: Likewise.
6923         * target.c: Likewise.
6924         * target-delegates.c: Regenerate.
6925
6926 2018-06-07  Pedro Alves  <palves@redhat.com>
6927
6928         * target.h (target_stack): Delete.
6929         (current_top_target): Declare function.
6930         * target.c (target_stack): Delete.
6931         (g_current_top_target): New.
6932         (current_top_target): New function.
6933         * auxv.c: Use current_top_target instead of target_stack
6934         throughout.
6935         * avr-tdep.c: Likewise.
6936         * breakpoint.c: Likewise.
6937         * corefile.c: Likewise.
6938         * elfread.c: Likewise.
6939         * eval.c: Likewise.
6940         * exceptions.c: Likewise.
6941         * frame.c: Likewise.
6942         * gdbarch-selftests.c: Likewise.
6943         * gnu-v3-abi.c: Likewise.
6944         * ia64-tdep.c: Likewise.
6945         * ia64-vms-tdep.c: Likewise.
6946         * infcall.c: Likewise.
6947         * infcmd.c: Likewise.
6948         * infrun.c: Likewise.
6949         * linespec.c: Likewise.
6950         * linux-tdep.c: Likewise.
6951         * minsyms.c: Likewise.
6952         * ppc-linux-nat.c: Likewise.
6953         * ppc-linux-tdep.c: Likewise.
6954         * procfs.c: Likewise.
6955         * regcache.c: Likewise.
6956         * remote.c: Likewise.
6957         * rs6000-tdep.c: Likewise.
6958         * s390-linux-nat.c: Likewise.
6959         * s390-tdep.c: Likewise.
6960         * solib-aix.c: Likewise.
6961         * solib-darwin.c: Likewise.
6962         * solib-dsbt.c: Likewise.
6963         * solib-spu.c: Likewise.
6964         * solib-svr4.c: Likewise.
6965         * solib-target.c: Likewise.
6966         * sparc-tdep.c: Likewise.
6967         * sparc64-tdep.c: Likewise.
6968         * spu-tdep.c: Likewise.
6969         * symfile.c: Likewise.
6970         * symtab.c: Likewise.
6971         * target-descriptions.c: Likewise.
6972         * target-memory.c: Likewise.
6973         * target.c: Likewise.
6974         * target.h: Likewise.
6975         * tracefile-tfile.c: Likewise.
6976         * tracepoint.c: Likewise.
6977         * valops.c: Likewise.
6978         * valprint.c: Likewise.
6979         * value.c: Likewise.
6980         * windows-tdep.c: Likewise.
6981         * mi/mi-main.c: Likewise.
6982
6983 2018-06-07  Tom Tromey  <tom@tromey.com>
6984
6985         * valprint.h (build_address_symbolic): Declare.
6986         * printcmd.c (print_address_symbolic): Update.
6987         (build_address_symbolic): Change "name" and "filename" to
6988         std::string.
6989         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6990         Update.
6991         * defs.h (build_address_symbolic): Remove declaration.
6992
6993 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6994
6995         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6996         (aarch64_vnv_type): Add function.
6997         (aarch64_pseudo_register_name): Add V regs for SVE.
6998         (aarch64_pseudo_register_type): Likewise.
6999         (aarch64_pseudo_register_reggroup_p): Likewise.
7000         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7001         (aarch64_pseudo_read_value): Add V regs for SVE.
7002         (aarch64_pseudo_write_2): Use V0 offset for SVE
7003         (aarch64_pseudo_write): Add V regs for SVE.
7004         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7005
7006 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7007
7008         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7009         (sve_vl_from_vq): Likewise.
7010
7011 2018-06-05  Tom Tromey  <tom@tromey.com>
7012
7013         * cli/cli-cmds.c (show_version): Update.
7014         * top.c (print_gdb_version): Add "interactive" parameter.
7015         Update.
7016         * main.c (captured_main_1): Update.
7017         * top.h (print_gdb_version): Add "interactive" parameter and a
7018         comment.
7019
7020 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7021
7022         * common/enum-flags.h: Add trailing semicolon to example in
7023         comment.
7024
7025 2018-06-05  Tom Tromey  <tom@tromey.com>
7026
7027         PR cli/12326:
7028         * NEWS: Add entry about pager.
7029         * utils.c (pagination_disabled_for_command): New global.
7030         (prompt_for_continue): Allow "c" response to prompt.
7031         (reinitialize_more_filter): Clear
7032         pagination_disabled_for_command.
7033         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7034
7035 2018-06-04  Tom Tromey  <tom@tromey.com>
7036
7037         * ada-lang.h (ada_lookup_symbol_list): Update.
7038         * ada-lang.c (resolve_subexp): Update.
7039         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7040         parameter.
7041         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7042         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7043         results parameter to std::vector.
7044         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7045         Update.
7046         * ada-exp.y (block_lookup): Update.
7047         (select_possible_type_sym): Change type of syms.  Remove nsyms
7048         parameter.
7049         (write_var_or_type, write_name_assoc): Update.
7050
7051 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7052
7053         * windows-nat.c (windows_nat_target::xfer_partial): Return
7054         TARGET_XFER_E_IO if we need to delegate to the target beneath
7055         but BENEATH is NULL.
7056
7057 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7058
7059         * Makefile.in (config.status): Add configure.nat as a
7060         dependency.
7061
7062 2018-06-04  Tom Tromey  <tom@tromey.com>
7063
7064         * cp-name-parser.y (cpname_state): Add method declarations.
7065         (HANDLE_QUAL): Update.
7066         (cpname_state::d_grab, cpname_state::fill_comp)
7067         (cpname_state::make_operator, cpname_state::make_dtor)
7068         (cpname_state::make_builtin_type, cpname_state::make_name)
7069         (cpname_state::d_qualify, cpname_state::d_int_type)
7070         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7071         (%union): Move earlier.
7072
7073 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7074
7075         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7076
7077 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7078
7079         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7080         (aarch64_pseudo_write_1): Likewise.
7081         (aarch64_pseudo_read_value): Use helper.
7082         (aarch64_pseudo_write): Likewise.
7083
7084 2018-06-04  Pedro Alves  <palves@redhat.com>
7085
7086         * darwin-nat.c (darwin_ops): Delete.
7087         (darwin_attach_pid): Use get_native_target.
7088
7089 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7090
7091         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7092         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7093
7094 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7095
7096         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7097         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7098         (aarch64_gdbarch_init): Check for SVE.
7099         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7100
7101 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7102
7103         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7104         * aarch64-tdep.h (aarch64_read_description): Likewise.
7105         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7106         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7107         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7108         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7109         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7110
7111 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7112
7113         * value.c (value_fetch_lazy_bitfield): New.
7114         (value_fetch_lazy_memory): New.
7115         (value_fetch_lazy_register): New.
7116         (value_fetch_lazy): Factor out to smaller functions.
7117
7118 2018-06-01  Tom Tromey  <tom@tromey.com>
7119
7120         * cp-name-parser.y (backslashable, represented): Now const.
7121
7122 2018-06-01  Tom Tromey  <tom@tromey.com>
7123
7124         * cp-name-parser.y: Include parser-defs.h.
7125         (parser_fprintf): Remove declaration.
7126
7127 2018-06-01  Tom Tromey  <tom@tromey.com>
7128
7129         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7130         %parse-param.
7131         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7132         (global_result): Remove globals.
7133         (struct cpname_state): New.
7134         (yyparse): Don't declare.
7135         (yylex, yyerror): Move declarations after %union.
7136         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7137         (make_name): Add state parameter.
7138         Update all callers.
7139         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7140         parameter.
7141         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7142         Update.
7143         (yylex): Add lvalp, state parameters.
7144         (yyerror): Add state parameter.
7145         (cp_demangled_name_to_comp): Update.
7146
7147 2018-06-01  Tom Tromey  <tom@tromey.com>
7148
7149         * cp-name-parser.y (parser_fprintf): Declare.
7150         (GDB_YY_REMAP_PREFIX): Define.
7151         Include yy-remap.h.  Don't redefine yy* identifiers.
7152
7153 2018-06-01  Tom Tromey  <tom@tromey.com>
7154
7155         * python/py-type.c (typy_legacy_template_argument): Update.
7156         * cp-support.h (cp_demangled_name_to_comp): Update.
7157         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7158         parameter to be a "std::string *".
7159         (main): Update.
7160
7161 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7162
7163         * ada-lex.l: Include "diagnostics.h" instead of
7164         "common/diagnostics.h".
7165         * unittests/environ-selftests.c: Likewise.
7166         * common/diagnostics.h: Moved to ../include.
7167
7168 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7169
7170         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7171         to language_mode_manual while calling breakpoint_re_set_one.
7172
7173 2018-06-01  Tom Tromey  <tom@tromey.com>
7174
7175         * valops.c (value_cast_structs, destructor_name_p): Update.
7176         * symtab.c (gdb_mangle_name): Update.
7177         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7178         Update.
7179         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7180         (pascal_object_print_value_fields, pascal_object_print_value):
7181         Update.
7182         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7183         * linespec.c (find_methods): Update.
7184         * gdbtypes.h (type_name_no_tag): Remove.
7185         (type_name_or_error): Rename from type_name_no_tag_or_error.
7186         * gdbtypes.c (type_name_no_tag): Remove.
7187         (type_name_or_error): Rename from type_name_no_tag_or_error.
7188         (lookup_struct_elt_type, check_typedef): Update.
7189         * expprint.c (print_subexp_standard): Update.
7190         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7191         * d-namespace.c (d_lookup_nested_symbol): Update.
7192         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7193         (cp_print_class_member): Update.
7194         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7195         * completer.c (add_struct_fields): Update.
7196         * c-typeprint.c (cp_type_print_derivation_info)
7197         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7198         Update.
7199         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7200         (ada_prefer_type, ada_is_exception_sym): Update.
7201
7202 2018-06-01  Tom Tromey  <tom@tromey.com>
7203
7204         * valops.c (enum_constant_from_type, value_namespace_elt)
7205         (value_maybe_namespace_elt): Update.
7206         * valarith.c (find_size_for_pointer_math): Update.
7207         * target-descriptions.c (make_gdb_type): Update.
7208         * symmisc.c (print_symbol): Update.
7209         * stabsread.c (define_symbol, read_type)
7210         (complain_about_struct_wipeout, add_undefined_type)
7211         (cleanup_undefined_types_1): Update.
7212         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7213         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7214         (rust_internal_print_type, rust_composite_type)
7215         (rust_evaluate_funcall, rust_evaluate_subexp)
7216         (rust_inclusive_range_type_p): Update.
7217         * python/py-type.c (typy_get_tag): Update.
7218         * p-typeprint.c (pascal_type_print_base): Update.
7219         * mdebugread.c (parse_symbol, parse_type): Update.
7220         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7221         Update.
7222         * guile/scm-type.c (gdbscm_type_tag): Update.
7223         * go-lang.c (sixg_string_p): Update.
7224         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7225         Update.
7226         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7227         (TYPE_TAG_NAME): Remove.
7228         * gdbtypes.c (type_name_no_tag): Simplify.
7229         (check_typedef, check_types_equal, recursive_dump_type)
7230         (copy_type_recursive, arch_composite_type): Update.
7231         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7232         in summary mode when needed.
7233         * eval.c (evaluate_funcall): Update.
7234         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7235         (process_structure_scope, read_enumeration_type)
7236         (read_namespace_type, read_module_type, determine_prefix): Update.
7237         * cp-support.c (inspect_type): Update.
7238         * coffread.c (process_coff_symbol, decode_base_type): Update.
7239         * c-varobj.c (c_is_path_expr_parent): Update.
7240         * c-typeprint.c (c_type_print_base_struct_union): Update.
7241         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7242         summary when using C language.
7243         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7244         (gen_maybe_namespace_elt): Update.
7245         * ada-lang.c (ada_type_name): Simplify.
7246         (empty_record, ada_template_to_fixed_record_type_1)
7247         (template_to_static_fixed_type)
7248         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7249
7250 2018-06-01  Tom Tromey  <tom@tromey.com>
7251
7252         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7253         c_print_type.
7254         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7255         (c_print_type): Update.
7256         (c_print_type): New overload.
7257         (c_type_print_varspec_prefix, c_type_print_args)
7258         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7259         (c_type_print_base_struct_union, c_type_print_base_1)
7260         (cp_type_print_method_args): Add "language" parameter.
7261         (c_type_print_base): Update.
7262         * c-lang.h (c_print_type): Add new overload.
7263
7264 2018-06-01  Tom Tromey  <tom@tromey.com>
7265
7266         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7267         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7268
7269 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7270
7271         * aarch64-tdep.c (aarch64_sve_register_names): New const
7272         var.
7273         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7274         (AARCH64_SVE_Z_REGS_NUM): New define.
7275         (AARCH64_SVE_P_REGS_NUM): Likewise.
7276         (AARCH64_SVE_NUM_REGS): Likewise.
7277
7278 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7279
7280         * nat/linux-ptrace.h [__alpha__]
7281         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7282         definitions.
7283
7284 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7285
7286         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7287         the endianness selected.
7288         * NEWS: Document `set endian auto' mode operation update.
7289
7290 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7291
7292         * Makefile.in: Add new header.
7293         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7294         (sve_vl_from_vg): Likewise.
7295         (sve_vq_from_vl): Likewise.
7296         (sve_vl_from_vq): Likewise.
7297         (sve_vq_from_vg): Likewise.
7298         (sve_vg_from_vq): Likewise.
7299         * configure.nat: Add new c file.
7300         * nat/aarch64-sve-linux-ptrace.c: New file.
7301         * nat/aarch64-sve-linux-ptrace.h: New file.
7302
7303 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7304
7305         * aarch64-linux-nat.c (aarch64_linux_read_description):
7306         Add parmeter zero.
7307         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7308         Likewise.
7309         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7310         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7311         (aarch64_gdbarch_init): Add parmeter zero.
7312         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7313         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7314         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7315         parmeter.
7316         * doc/gdb.texinfo: Describe SVE feature
7317         * features/aarch64-sve.c: New file.
7318
7319 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7320
7321         PR gdb/23210
7322         * gdbarch.sh (significant_addr_bit): Default to zero when
7323         not set by target architecture.
7324         * gdbarch.c: Re-generated.
7325         * utils.c (address_significant): Update.
7326
7327 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7328
7329         * stack.c (func_command): Remove trailing newline in call to error.
7330
7331 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7332
7333         * regcache.h (regcache_raw_collect): Remove, update callers to
7334         use regcache::raw_collect.
7335         * regcache.c (regcache_raw_collect): Remove.
7336
7337 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7338
7339         * regcache.h (regcache_raw_supply): Remove, update callers to
7340         use detached_regcache::raw_supply.
7341         * regcache.c (regcache_raw_supply): Remove.
7342
7343 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7344
7345         * regcache.h (regcache_cooked_write_part): Remove, update
7346         callers to use regcache::cooked_write_part.
7347         * regcache.c (regcache_cooked_write_part): Remove.
7348
7349 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7350
7351         * regcache.h (regcache_cooked_read_part): Remove, update callers
7352         to use readable_regcache::cooked_read_part.
7353         * regcache.c (regcache_cooked_read_part): Remove.
7354
7355 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7356
7357         * regcache.h (regcache_cooked_read_value): Remove, update
7358         callers to use readable_regcache::cooked_read_value.
7359         * regcache.c (regcache_cooked_read_value): Remove.
7360
7361 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7362
7363         * regcache.h (regcache_cooked_write): Remove, update callers to
7364         use regcache::cooked_write.
7365         * regcache.c (regcache_cooked_write): Remove.
7366
7367 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7368
7369         * regcache.h (regcache_invalidate): Remove, update callers to
7370         use detached_regcache::invalidate instead.
7371         * regcache.c (regcache_invalidate): Remove.
7372
7373 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7374
7375         * regcache.h (regcache_raw_write_part): Remove, update callers
7376         to use regcache::raw_write_part instead.
7377         * regcache.c (regcache_raw_write_part): Remove.
7378
7379 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7380
7381         * regcache.h (regcache_raw_read_part): Remove, update callers to
7382         use readable_regcache::raw_read_part instead.
7383         * regcache.c (regcache_raw_read_part): Remove.
7384
7385 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7386
7387         * regcache.h (regcache_cooked_read): Remove, update callers to
7388         use readable_regcache::cooked_read instead.
7389         * regcache.c (regcache_cooked_read): Remove.
7390
7391 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7392
7393         * regcache.h (regcache_raw_write): Remove, update callers to use
7394         regcache::raw_write instead.
7395         * regcache.c (regcache_raw_write): Remove.
7396
7397 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7398
7399         * regcache.h (regcache_raw_read): Remove, update callers to use
7400         readable_regcache::raw_read instead.
7401         * regcache.c (regcache_raw_read): Remove.
7402
7403 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7404
7405         * regcache.h (regcache_raw_update): Remove, update callers to
7406         use readable_regcache::raw_update instead.
7407         * regcache.c (regcache_raw_update): Remove.
7408
7409 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7410
7411         * regcache.h (regcache_register_status): Remove, update callers
7412         to use reg_buffer::get_register_status directly instead.
7413         * regcache.c (regcache_register_status): Remove.
7414
7415 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7416
7417         * regcache.h (regcache_get_ptid): Remove, update all callers to
7418         call regcache::ptid instead.
7419         * regcache.c (regcache_get_ptid): Remove.
7420
7421 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7422
7423         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7424
7425 2018-05-30  Pedro Alves  <palves@redhat.com>
7426
7427         * common/common-exceptions.h (exception_rethrow): Use
7428         ATTRIBUTE_NORETURN.
7429
7430 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7431
7432         * breakpoint.c (print_solib_event, check_status_catch_solib):
7433         Remove struct keyword in range-based for loops.
7434         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7435         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7436         Likewise.
7437         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7438         Likewise.
7439         * symfile.c (addr_info_make_relative): Likewise.
7440         * thread.c (value_in_thread_stack_temporaries): Likewise.
7441
7442 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7443
7444         PR gdb/16841
7445         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7446         aggregate type to get its real type before accessing it.
7447
7448 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7449
7450         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7451         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7452         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7453         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7454         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7455         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7456         * printcmd.c (info_address_command): Likewise.
7457
7458 2018-05-29  Tom Tromey  <tom@tromey.com>
7459
7460         * windows-nat.c (handle_exception): Update fall-through comment.
7461
7462 2018-05-29  Tom Tromey  <tom@tromey.com>
7463
7464         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7465         (struct program_space) <added_solibs>: Now a std::vector.
7466         * breakpoint.c (print_solib_event): Update.
7467         (check_status_catch_solib): Update.
7468         * progspace.c (clear_program_space_solib_cache): Update.
7469         * solib.c (update_solib_list): Update.
7470
7471 2018-05-29  Tom Tromey  <tom@tromey.com>
7472
7473         * python/py-type.c (typy_richcompare): Update.
7474         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7475         * gdbtypes.h (types_deeply_equal): Return bool.
7476         (types_equal): Likewise.
7477         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7478         declare VEC.
7479         (check_types_equal): Change worklist to std::vector.  Return
7480         bool.
7481         (struct type_equality_entry): Add constructor.
7482         (compare_maybe_null_strings): Return bool.
7483         (check_types_worklist): Return bool.  Change worklist to
7484         std::vector.
7485         (types_deeply_equal): Use std::vector.
7486         (types_equal): Return bool.
7487         (compare_maybe_null_strings): Simplify.
7488
7489 2018-05-29  Tom Tromey  <tom@tromey.com>
7490
7491         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7492
7493 2018-05-29  Tom Tromey  <tom@tromey.com>
7494
7495         * objc-lang.h: Don't include cp-support.h.
7496         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7497         declare VEC.
7498
7499 2018-05-27  Tom Tromey  <tom@tromey.com>
7500
7501         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7502
7503 2018-05-25  Tom Tromey  <tom@tromey.com>
7504
7505         * value.c (value::location): Initialize.
7506
7507 2018-05-25  Tom Tromey  <tom@tromey.com>
7508
7509         * dbxread.c (init_bincl_list): Remove.
7510         (bincl_list): Now a std::vector.
7511         (bincls_allocated, next_bincl): Remove.
7512         (free_bincl_list, do_free_bincl_list_cleanup)
7513         (make_cleanup_free_bincl_list): Remove.
7514         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7515         unique_xmalloc_ptr.
7516         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7517         (struct header_file_location): Add constructor.
7518         (add_bincl_to_list): Remove.
7519
7520 2018-05-25  Tom Tromey  <tom@tromey.com>
7521
7522         * tui/tui.c (tui_enable): Update.
7523         * mi/mi-interp.c (mi_interp::init): Update.
7524         * interps.h (class interp) <name>: New method.
7525         <m_name>: Rename from name.
7526         (~scoped_restore_interp): Update.
7527         * interps.c (interp::interp): Update.
7528         (interp_add, interp_set, interp_lookup_existing)
7529         (current_interp_named_p): Update.
7530
7531 2018-05-25  Tom Tromey  <tom@tromey.com>
7532
7533         * interps.c (interp_name): Remove.
7534         * mi/mi-interp.c (mi_interp::init): Update.
7535         * interps.h (interp_name): Remove.
7536         (~scoped_restore_interp): Update.
7537         * tui/tui.c (tui_enable): Update.
7538
7539 2018-05-25  Tom Tromey  <tom@tromey.com>
7540
7541         * utils.c (fputs_maybe_filtered): Update.
7542         * linespec.c (decode_line_full): Update.
7543         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7544         (mi_print_breakpoint_for_event, mi_solib_loaded)
7545         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7546         (mi_user_selected_context_changed): Update.
7547         * mi/mi-main.c (mi_execute_command): Update.
7548         * cli/cli-script.c (execute_control_command): Update.
7549         * python/python.c (execute_gdb_command): Update.
7550         * solib.c (info_sharedlibrary_command): Update.
7551         * interps.c (interp_ui_out): Remove.
7552         * interps.h (interp_ui_out): Remove.
7553
7554 2018-05-25  Tom Tromey  <tom@tromey.com>
7555
7556         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7557         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7558         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7559
7560 2018-05-25  Tom Tromey  <tom@tromey.com>
7561
7562         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7563         * interps.c (interp_exec): Use scoped_restore.
7564
7565 2018-05-25  Tom Tromey  <tom@tromey.com>
7566
7567         * remote.c (remote_target::remote_file_get): Use
7568         gdb::byte_vector.
7569         (remote_target::remote_file_put): Likewise.
7570
7571 2018-05-25  Tom Tromey  <tom@tromey.com>
7572
7573         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7574         a std::string.
7575         (get_pe_section_index, add_pe_exported_sym): Update.
7576         (read_pe_exported_syms): Use gdb::def_vector.
7577
7578 2018-05-25  Tom Tromey  <tom@tromey.com>
7579
7580         * frame.c (remove_prev_frame): Remove.
7581         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7582
7583 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7584
7585         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7586         Remove prototypes.
7587         * mips-linux-nat.c (supply_fpregset): Always call
7588         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7589         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7590         `mips_fill_fpregset'.
7591         * mips-linux-tdep.c (mips_supply_fpregset)
7592         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7593         (mips_fill_fpregset_wrapper): Remove functions.
7594         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7595         (mips_linux_fpregset): Remove variable.
7596         (mips_linux_iterate_over_regset_sections): Use
7597         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7598         (mips_linux_o32_sigframe_init): Remove comment.
7599
7600 2018-05-25  Pedro Alves  <palves@redhat.com>
7601
7602         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7603         (struct readahead_cache, struct packet_reg, struct
7604         remote_arch_state, class remote_state): Move higher up in the
7605         file.
7606         (remote_target::m_remote_state): Now an object instead of a pointer.
7607         (remote_target::get_remote_state): Adjust.
7608
7609 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7610
7611         * stack.c (select_and_print_frame): Delete.
7612         (struct function_bounds): Move struct within function.
7613         (func_command): Most content moved into new function
7614         find_frame_for_function, use new function, print result, add
7615         function comment.
7616         (find_frame_for_function): New function, now returns a result.
7617
7618 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7619
7620         * stack.c (iterate_over_block_arg_vars): Fix comment.
7621         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7622
7623 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7624
7625         PR gdb/23203
7626         * frame.c
7627         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7628         Define.
7629         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7630         Define.
7631         * frame.h (class scoped_restore_selected_frame): New class.
7632         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7633         of any exception, use scoped_restore_selected_frame to restore the
7634         frame instead.
7635
7636 2018-05-24  Pedro Alves  <palves@redhat.com>
7637
7638         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7639         override.
7640
7641 2018-05-23  Tom Tromey  <tom@tromey.com>
7642
7643         * complaints.c (struct complaints): Remove.
7644         (symfile_complaint_book): Remove.
7645         (series): New global.
7646         (complaint_internal): Update.
7647         (clear_complaints): Update.
7648
7649 2018-05-23  Tom Tromey  <tom@tromey.com>
7650
7651         * complaints.c (counters): New global.
7652         (struct complain): Remove.
7653         (struct complaints) <root>: Remove.
7654         (complaint_sentinel): Remove.
7655         (symfile_complaint_book): Update.
7656         (find_complaint) Remove.
7657         (complaint_internal, clear_complaints): Update.
7658
7659 2018-05-23  Tom Tromey  <tom@tromey.com>
7660
7661         * complaints.c (struct complain) <file, line>: Remove.
7662         (find_complaint): Remove file, line parameters.
7663         (complaint_internal): Update.
7664
7665 2018-05-23  Tom Tromey  <tom@tromey.com>
7666
7667         * complaints.c (vcomplaint): Remove.
7668         (complaint_internal) Merge in contents of vcomplaint.
7669
7670 2018-05-23  Tom Tromey  <tom@tromey.com>
7671
7672         * complaints.c (struct complaints) <explanation>: Remove.
7673         (symfile_explanations): Remove.
7674         (symfile_complaint_book): Update.
7675         (vcomplaint): Update.
7676         (struct explanation): Remove.
7677
7678 2018-05-23  Tom Tromey  <tom@tromey.com>
7679
7680         * complaints.c (symfile_complaints): Remove.
7681         (complaint_internal): Remove "complaints" parameter.
7682         (clear_complaints, vcomplaint): Remove "c" parameter.
7683         (get_complaints): Remove.
7684         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7685         (dwarf2_debug_line_missing_file_complaint)
7686         (dwarf2_debug_line_missing_end_sequence_complaint)
7687         (dwarf2_complex_location_expr_complaint)
7688         (dwarf2_const_value_length_mismatch_complaint)
7689         (dwarf2_section_buffer_overflow_complaint)
7690         (dwarf2_macro_malformed_definition_complaint)
7691         (dwarf2_invalid_attrib_class_complaint)
7692         (create_addrmap_from_index, dw2_symtab_iter_next)
7693         (dw2_expand_marked_cus)
7694         (dw2_debug_names_iterator::find_vec_in_debug_names)
7695         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7696         (create_debug_type_hash_table, init_cutu_and_read_dies)
7697         (partial_die_parent_scope, add_partial_enumeration)
7698         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7699         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7700         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7701         (create_cus_hash_table, create_dwp_hash_table)
7702         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7703         (dwarf2_rnglists_process, dwarf2_ranges_process)
7704         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7705         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7706         (handle_struct_member_die, process_structure_scope)
7707         (read_array_type, read_common_block, read_module_type)
7708         (read_tag_pointer_type, read_typedef, read_base_type)
7709         (read_subrange_type, load_partial_dies, partial_die_info::read)
7710         (partial_die_info::read, partial_die_info::read)
7711         (partial_die_info::read, read_checked_initial_length_and_offset)
7712         (dwarf2_string_attr, read_formatted_entries)
7713         (dwarf_decode_line_header)
7714         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7715         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7716         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7717         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7718         (get_signatured_type, get_DW_AT_signature_type)
7719         (decode_locdesc, file_file_name, consume_improper_spaces)
7720         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7721         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7722         (dwarf2_symbol_mark_computed, set_die_type)
7723         (read_attribute_value): Update.
7724         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7725         Update.
7726         * dbxread.c (unknown_symtype_complaint)
7727         (lbrac_mismatch_complaint, repeated_header_complaint)
7728         (set_namestring, function_outside_compilation_unit_complaint)
7729         (read_dbx_symtab, process_one_symbol): Update.
7730         * gdbtypes.c (stub_noname_complaint): Update.
7731         * windows-nat.c (handle_unload_dll): Update.
7732         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7733         (decode_base_type): Update.
7734         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7735         (eb_complaint, record_include_begin, record_include_end)
7736         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7737         (process_xcoff_symbol, read_symbol)
7738         (function_outside_compilation_unit_complaint)
7739         (scan_xcoff_symtab): Update.
7740         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7741         * buildsym.c (finish_block_internal, make_blockvector)
7742         (end_symtab_get_static_block, augment_type_symtab): Update.
7743         * dtrace-probe.c (dtrace_process_dof)
7744         (dtrace_static_probe_ops::get_probes): Update.
7745         * complaints.h (struct complaint): Don't declare.
7746         (symfile_complaints): Remove.
7747         (complaint_internal): Remove "complaints" parameter.
7748         (complaint): Likewise.
7749         (clear_complaints): Likewise.
7750         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7751         (reread_symbols): Update.
7752         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7753         (dwarf2_frame_cache, decode_frame_entry): Update.
7754         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7755         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7756         (info_selectors_command): Update.
7757         * macrotab.c (macro_include, check_for_redefinition)
7758         (macro_undef): Update.
7759         * objfiles.c (filter_overlapping_sections): Update.
7760         * stabsread.c (invalid_cpp_abbrev_complaint)
7761         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7762         (define_symbol, error_type, read_type, rs6000_builtin_type)
7763         (stabs_method_name_from_physname, read_member_functions)
7764         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7765         (attach_fields_to_type, complain_about_struct_wipeout)
7766         (read_range_type, read_args, common_block_start)
7767         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7768         Update.
7769         * mdebugread.c (index_complaint, unknown_ext_complaint)
7770         (basic_type_complaint, bad_tag_guess_complaint)
7771         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7772         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7773         (parse_procedure, parse_lines)
7774         (function_outside_compilation_unit_complaint)
7775         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7776         (bad_tag_guess_complaint, reg_value_complaint): Update.
7777         * cp-support.c (demangled_name_complaint): Update.
7778         * macroscope.c (sal_macro_scope): Update.
7779         * dwarf-index-write.c (class debug_names): Update.
7780
7781 2018-05-23  Tom Tromey  <tom@tromey.com>
7782
7783         * complaints.c (clear_complaints): Remove "noisy" parameter.
7784         * complaints.h (clear_complaints): Update.
7785         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7786         (reread_symbols): Update.
7787
7788 2018-05-23  Tom Tromey  <tom@tromey.com>
7789
7790         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7791         SUBSEQUENT_MESSAGE.
7792         (vcomplaint, clear_complaints): Update.
7793         (symfile_explanations): Remove some messages.
7794
7795 2018-05-23  Tom Tromey  <tom@tromey.com>
7796
7797         * complaints.c (internal_complaint): Remove.
7798         * complaints.h (internal_complaint): Remove.
7799
7800 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7801
7802         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7803
7804 2018-05-22  Pedro Alves  <palves@redhat.com>
7805
7806         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7807         (remote_fileio_badfd, remote_fileio_return_errno)
7808         (remote_fileio_return_success, remote_fileio_func_open)
7809         (remote_fileio_func_open, remote_fileio_func_close)
7810         (remote_fileio_func_read, remote_fileio_func_write)
7811         (remote_fileio_func_lseek, remote_fileio_func_rename)
7812         (remote_fileio_func_unlink, remote_fileio_func_stat)
7813         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7814         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7815         remote_target parameter.
7816         (remote_fio_func_map) <func>: Add remote_target parameter.
7817         (do_remote_fileio_request, remote_fileio_request):
7818         * remote-fileio.h (remote_fileio_request):
7819         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7820         remote_target parameter.
7821         (remote_notif_process, handle_notification): Adjust to pass down
7822         the remote.
7823         (remote_notif_state_allocate): Add remote_target parameter.  Save
7824         it.
7825         * remote-notif.h (struct remote_target): Forward declare.
7826         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7827         remote_target parameter.
7828         (struct remote_notif_state) <remote>: New field.
7829         (remote_notif_ack, remote_notif_parse): Add remote_target
7830         parameter.
7831         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7832         remote_target parameter.
7833         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7834         (threads_listing_context, rmt_thread_action, protocol_feature)
7835         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7836         (packet_result, struct threads_listing_context, remote_state):
7837         Move definitions and declarations higher up.
7838         (remote_target) <~remote_target>: Declare.
7839         (remote_download_command_source, remote_file_put, remote_file_get)
7840         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7841         (remote_hostio_pread_vFile, remote_hostio_send_command)
7842         (remote_hostio_set_filesystem, remote_hostio_open)
7843         (remote_hostio_close, remote_hostio_unlink, remote_state)
7844         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7845         (get_memory_write_packet_size, get_memory_read_packet_size)
7846         (append_pending_thread_resumptions, remote_detach_1)
7847         (append_resumption, remote_resume_with_vcont)
7848         (add_current_inferior_and_thread, wait_ns, wait_as)
7849         (process_stop_reply, remote_notice_new_inferior)
7850         (process_initial_stop_replies, remote_add_thread)
7851         (btrace_sync_conf, remote_btrace_maybe_reopen)
7852         (remove_new_fork_children, kill_new_fork_children)
7853         (discard_pending_stop_replies, stop_reply_queue_length)
7854         (check_pending_events_prevent_wildcard_vcont)
7855         (discard_pending_stop_replies_in_queue, stop_reply)
7856         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7857         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7858         (remote_interrupt_as, remote_interrupt_ns)
7859         (remote_get_noisy_reply, remote_query_attached)
7860         (remote_add_inferior, remote_current_thread, get_current_thread)
7861         (set_thread, set_general_thread, set_continue_thread)
7862         (set_general_process, write_ptid)
7863         (remote_unpack_thread_info_response, remote_get_threadinfo)
7864         (parse_threadlist_response, remote_get_threadlist)
7865         (remote_threadlist_iterator, remote_get_threads_with_ql)
7866         (remote_get_threads_with_qxfer)
7867         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7868         (get_offsets, remote_check_symbols, remote_supported_packet)
7869         (remote_query_supported, remote_packet_size)
7870         (remote_serial_quit_handler, remote_detach_pid)
7871         (remote_vcont_probe, remote_resume_with_hc)
7872         (send_interrupt_sequence, interrupt_query)
7873         (remote_notif_get_pending_events, fetch_register_using_p)
7874         (send_g_packet, process_g_packet, fetch_registers_using_g)
7875         (store_register_using_P, store_registers_using_G)
7876         (set_remote_traceframe, check_binary_download)
7877         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7878         (remote_xfer_live_readonly_partial, remote_read_bytes)
7879         (remote_send_printf, remote_flash_write, readchar)
7880         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7881         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7882         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7883         (extended_remote_disable_randomization, extended_remote_run)
7884         (send_environment_packet, extended_remote_environment_support)
7885         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7886         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7887         (packet_command): Now methods of ...
7888         (remote_target): ... this class.
7889         (m_remote_state) <remote_target>: New field.
7890         (struct remote_state) <stop_reply_queue,
7891         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7892         fields.
7893         (remote_state::remote_state): Allocate stop_reply_queue.
7894         (remote_state): Delete global.
7895         (get_remote_state_raw): Delete.
7896         (remote_target::get_remote_state): Allocate m_remote_state on
7897         demand.
7898         (get_current_remote_target): New.
7899         (remote_ops, extended_remote_ops): Delete.
7900         (wait_forever_enabled_p, remote_async_inferior_event_token):
7901         Delete, moved to struct remote_state.
7902         (remote_target::close): Delete self.  Destruction bits split to
7903         ...
7904         (remote_target::~remote_target): ... this.
7905         (show_memory_packet_size): Adjust to use
7906         get_current_remote_target.
7907         (struct protocol_feature) <func>: Add remote_target parameter.
7908         All callers adjusted.
7909         (curr_quit_handler_target): New.
7910         (remote_serial_quit_handler): Reimplement.
7911         (remote_target::open_1): Adjust to use get_current_remote_target.
7912         Heap-allocate remote_target/extended_remote_target instances.
7913         (vcont_builder::vcont_builder): Add remote_target parameter, and
7914         save it in m_remote.  All callers adjusted.
7915         (vcont_builder::m_remote): New field.
7916         (vcont_builder::restart, vcont_builder::flush)
7917         (vcont_builder::push_action): Use it.
7918         (remote_target::commit_resume): Use it.
7919         (struct queue_iter_param) <remote>: New field.
7920         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7921         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7922         (check_pending_event_prevents_wildcard_vcont_callback)
7923         (remote_target::check_pending_events_prevent_wildcard_vcont)
7924         (remote_target::discard_pending_stop_replies)
7925         (remote_target::discard_pending_stop_replies_in_queue)
7926         (remote_target::remote_notif_remove_queued_reply): Fill in
7927         'remote' field.
7928         (remote_notif_get_pending_events): New.
7929         (remote_target::readchar, remote_target::remote_serial_write):
7930         Save/restore curr_quit_handler_target.
7931         (putpkt): New.
7932         (kill_new_fork_children): Fill in 'remote' field.
7933         (packet_command): Use get_current_remote_target, defer to
7934         remote_target method of same name.
7935         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7936         parameter, and save it in m_remote.  All callers adjusted.
7937         (scoped_remote_fd::release): Use m_remote.
7938         (scoped_remote_fd::m_remote): New field.
7939         (remote_file_put, remote_file_get, remote_file_delete): Use
7940         get_current_remote_target, defer to remote_target method of same
7941         name.
7942         (remote_btrace_reset): Add remote_state paremeter.  Update all
7943         callers.
7944         (remote_async_inferior_event_handler). Pass down 'data'.
7945         (remote_new_objfile): Use get_current_remote_target.
7946         (remote_target::vcont_r_supported): New.
7947         (set_range_stepping): Use get_current_remote_target and
7948         remote_target::vcont_r_supported.
7949         (_initialize_remote): Don't allocate 'remote_state' and
7950         'stop_reply_queue' globals.
7951         * remote.h (struct remote_target): Forward declare.
7952         (getpkt, putpkt, remote_notif_get_pending_events): Add
7953         'remote_target' parameter.
7954
7955 2018-05-22  Pedro Alves  <palves@redhat.com>
7956
7957         * remote.c (vcont_builder): Now a class.  Make all data members
7958         private.
7959         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7960         Declare methods.
7961         (vcont_builder_restart): Rename to ...
7962         (vcont_builder::restart): ... this.
7963         (vcont_builder_flush): Rename to ...
7964         (vcont_builder::flush): ... this.
7965         (vcont_builder_push_action): Rename to ...
7966         (vcont_builder::push_action): ... this.
7967         (remote_target::commit_resume): Adjust.
7968
7969 2018-05-22  Pedro Alves  <palves@redhat.com>
7970
7971         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7972         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7973         (get_fixed_memory_packet_size): New.
7974         (get_memory_packet_size): Use it.
7975         (set_memory_packet_size): Don't override the config size with
7976         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7977         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7978         Don't refer to get_memory_packet_size if not connected to a remote
7979         target.  Show "(default)" if configured size is 0.
7980
7981 2018-05-22  Pedro Alves  <palves@redhat.com>
7982
7983         * remote.c (remote_target::mourn_inferior): Move
7984         discard_pending_stop_replies call here from ...
7985         (_initialize_remote): ... here.
7986
7987 2018-05-22  Pedro Alves  <palves@redhat.com>
7988
7989         * remote.c (compare_section_command): Remove set_general_process
7990         call.
7991
7992 2018-05-22  Pedro Alves  <palves@redhat.com>
7993
7994         * remote.c (struct packet_reg, struct remote_arch_state):
7995         Move higher up in the file.
7996         (remote_state) <m_arch_states>: Store remote_arch_state values
7997         instead of remote_arch_state pointers.
7998         (remote_state::get_remote_arch_state): Adjust.
7999
8000 2018-05-22  Pedro Alves  <palves@redhat.com>
8001
8002         * remote.c: Include <unordered_map>.
8003         (remote_state): Now a class.
8004         (remote_state) <get_remote_arch_state>: Declare method.
8005         <get_remote_arch_state>: New field.
8006         (remote_arch_state) <remote_arch_state>: Declare ctor.
8007         <regs>: Now a unique_ptr.
8008         (remote_gdbarch_data_handle): Delete.
8009         (get_remote_arch_state): Delete.
8010         (remote_state::get_remote_arch_state): New.
8011         (get_remote_state): Adjust to call remote_state's
8012         get_remote_arch_state method.
8013         (init_remote_state): Delete, bits factored out to ...
8014         (remote_arch_state::remote_arch_state): ... this new method.
8015         (get_remote_packet_size, get_memory_packet_size)
8016         (process_g_packet, remote_target::fetch_registers)
8017         (remote_target::prepare_to_store, store_registers_using_G)
8018         (remote_target::store_registers, remote_target::get_trace_status):
8019         Adjust to call remote_state's method.
8020         (_initialize_remote): Remove reference to
8021         remote_gdbarch_data_handle.
8022
8023 2018-05-22  Pedro Alves  <palves@redhat.com>
8024
8025         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8026         pread>: New method declarations.
8027         (remote_target::open_1): Adjust.
8028         (readahead_cache_invalidate): Rename to ...
8029         (readahead_cache::invalidate): ... this, and adjust to be a class
8030         method.
8031         (readahead_cache_invalidate_fd): Rename to ...
8032         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8033         class method.
8034         (remote_hostio_pwrite): Adjust.
8035         (remote_hostio_pread_from_cache): Rename to ...
8036         (readahead_cache::pread): ... this, and adjust to be a class
8037         method.
8038         (remote_hostio_close): Adjust.
8039
8040 2018-05-22  Pedro Alves  <palves@redhat.com>
8041
8042         * remote.c (remote_hostio_close_cleanup): Delete.
8043         (class scoped_remote_fd): New.
8044         (remote_file_put, remote_file_get): Use it.
8045
8046 2018-05-22  Pedro Alves  <palves@redhat.com>
8047
8048         (struct vCont_action_support): Use bool and initialize all fields.
8049         (struct readahead_cache): Initialize all fields.
8050         (remote_state): Use bool and initialize all fields.
8051         (remote_state::remote_state, remote_state::~remote_state): New.
8052         (new_remote_state): Delete.
8053         (_initialize_remote): Use new to allocate remote_state.
8054
8055 2018-05-22  Pedro Alves  <palves@redhat.com>
8056             張俊芝  <zjz@zjz.name>
8057
8058         PR gdb/22973
8059         * c-exp.y: Include "c-support.h".
8060         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8061         of tolower.  Use c_ident_is_alpha to scan names.
8062         * c-lang.c: Include "c-support.h".
8063         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8064         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8065         * c-support.h: New file, with bits factored out from ...
8066         * cp-name-parser.y: ... this file.
8067         Include "c-support.h".
8068         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8069         c-support.h and renamed.
8070         (symbol_end, yylex): Adjust.
8071
8072 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8073
8074         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8075         parameter type to CORE_ADDR.
8076         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8077         parameter type in declaration to CORE_ADDR.
8078         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8079         target_auxv_search to get AT_HWCAP and use the result to get the
8080         target description.
8081         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8082         to CORE_ADDR. Remove the cast of the return value to unsigned
8083         long. Fix error predicate of target_auxv_search.
8084         (ppc_linux_nat_target::read_description): Change the type of the
8085         hwcap variable to CORE_ADDR.
8086
8087 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8088
8089         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8090         if the size of fpscr is larger than 32 bits.
8091
8092 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8093
8094         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8095         (ppc32_linux_vsxregmap): New global.
8096         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8097         regcache_supply_regset, and regcache_collect_regset.
8098         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8099         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8100         (fetch_vsx_register, store_vsx_register): Remove.
8101         (fetch_vsx_registers): Add regno parameter. Get regset using
8102         ppc_linux_vsxregset. Use regset to supply registers.
8103         (store_vsx_registers): Add regno parameter. Get regset using
8104         ppc_linux_vsxregset. Use regset to collect registers.
8105         (fetch_register): Call fetch_vsx_registers instead of
8106         fetch_vsx_register.
8107         (store_register): Call store_vsx_registers instead of
8108         store_vsx_register.
8109         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8110         new regno parameter.
8111         (store_ppc_registers): Call store_vsx_registers with -1 for the
8112         new regno parameter.
8113         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8114         (ppc_collect_vsxregset): Remove.
8115
8116 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8117
8118         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8119         offset fields.
8120         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8121         for vector register offset fields.
8122         (ppc64_fbsd_reg_offsets): Likewise.
8123         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8124         to vector register offset fields.
8125         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8126         to vector register offset fields.
8127         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8128         vector register offset fields.
8129         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8130         initializers for vector register offset fields.
8131         (rs6000_aix64_reg_offsets): Likewise.
8132         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8133         (ppc_supply_vrregset): Remove.
8134         (ppc_collect_vrregset): Remove.
8135         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8136         (ppc_linux_vrregset) : New function.
8137         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8138         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8139         (ppc32_linux_vrregset): Remove.
8140         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8141         and use result instead of ppc32_linux_vrregset.
8142         (ppc32_linux_reg_offsets): Remove initializers for vector register
8143         offset fields.
8144         (ppc64_linux_reg_offsets): Likewise.
8145         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8146         * ppc-linux-nat.c: Include regset.h.
8147         (gdb_vrregset_t): Adjust comment to account for little-endian
8148         mode.
8149         (supply_vrregset, fill_vrregset): Remove.
8150         (fetch_altivec_register, store_altivec_register): Remove.
8151         (fetch_altivec_registers): Add regno parameter. Get regset using
8152         ppc_linux_vrregset. Use regset to supply registers.
8153         (store_altivec_registers): Add regno parameter. Get regset using
8154         ppc_linux_vrregset. Use regset to collect registers.
8155         (fetch_register): Call fetch_altivec_registers instead of
8156         fetch_altivec_register.
8157         (store_register): Call store_altivec_registers instead of
8158         store_altivec_register.
8159         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8160         the new regno parameter.
8161         (store_ppc_registers): Call store_altivec_registers with -1 for
8162         the new regno parameter.
8163
8164 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8165
8166         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8167         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8168         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8169         (gdb_vrregset_t): Change array type size to
8170         PPC_LINUX_SIZEOF_VRREGSET.
8171         (gdb_vsxregset_t): Change array type size to
8172         PPC_LINUX_SIZEOF_VSXREGSET.
8173         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8174         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8175         PPC_LINUX_SIZEOF_VSXREGSET.
8176
8177 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8178
8179         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8180         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8181         nat/ppc-linux.c.
8182         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8183         ppc_linux_target_wordsize with tid.
8184         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8185         wordsize with tid.
8186         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8187         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8188         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8189         tid parameter. Remove static specifier.
8190         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8191         (ppc_linux_target_wordsize): New declaration.
8192
8193 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8194
8195         * arch/ppc-linux-common.c: New file.
8196         * arch/ppc-linux-common.h: New file.
8197         * arch/ppc-linux-tdesc.h: New file.
8198         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8199         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8200         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8201         arch/ppc-linux-tdesc.h.
8202         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8203         arch/ppc-linux-tdesc.h.
8204         (ppc_linux_nat_target::read_description): Remove target
8205         description matching code. Fill a ppc_linux_features struct and
8206         call ppc_linux_match_description with it. Move comment about ISA
8207         2.05 to ppc-linux-common.c.
8208         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8209         arch/ppc-linux-tdesc.h.
8210         (ppc_linux_core_read_description): Remove target description
8211         matching code. Fill a ppc_linux_features struct and call
8212         ppc_linux_match_description with it.
8213         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8214         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8215         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8216         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8217         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8218         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8219         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8220         (tdesc_powerpc_e500l): Remove.
8221
8222 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8223
8224         * ada-lang.c (catch_assert_command): Pass empty string instead
8225         of NULL for excep_string argument.
8226
8227 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8228
8229         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8230         the width of the requested register exceeds the width of the
8231         `ptrace' data type.
8232
8233 2018-05-21  Tom Tromey  <tom@tromey.com>
8234
8235         * printcmd.c (output_command): Remove.
8236         (output_command_const): Rename to output_command.
8237         * valprint.h (output_command): Rename from output_command_const.
8238         * tracepoint.c (trace_dump_actions): Call output_command.
8239
8240 2018-05-21  Tom Tromey  <tom@tromey.com>
8241
8242         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8243         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8244         * ada-lang.h (create_ada_exception_catchpoint): Update.
8245         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8246         std::string.
8247         (create_excep_cond_exprs, ~ada_catchpoint)
8248         (should_stop_exception, print_one_exception)
8249         (print_mention_exception, print_recreate_exception): Update.
8250         (ada_get_next_arg): Remove.
8251         (catch_ada_exception_command_split): Use std::string.  Change type
8252         of "excep_string", "cond_string".
8253         (catch_ada_exception_command): Update.
8254         (create_ada_exception_catchpoint): Change type of excep_string.
8255         (ada_exception_sal): Remove excep_string parameter.
8256         (~ada_catchpoint): Remove.
8257
8258 2018-05-21  Tom Tromey  <tom@tromey.com>
8259
8260         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8261         cleanup.
8262
8263 2018-05-21  Tom Tromey  <tom@tromey.com>
8264
8265         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8266         Return unique_xmalloc_ptr.
8267         (print_it_exception): Update.
8268
8269 2018-05-21  Tom Tromey  <tom@tromey.com>
8270
8271         * tracepoint.c (trace_dump_actions): Use std::string.
8272
8273 2018-05-21  Tom Tromey  <tom@tromey.com>
8274
8275         * symfile.c (reread_symbols): Use std::string for original_name.
8276
8277 2018-05-21  Tom Tromey  <tom@tromey.com>
8278
8279         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8280         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8281         constructor.
8282
8283 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8284
8285         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8286         instance to...
8287         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8288         * objfiles.c (get_objfile_bfd_data): Allocate
8289         objfile_per_bfd_storage with obstack_new when allocating on
8290         obstack.
8291
8292 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8293
8294         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8295         OBSTACK_ZALLOC.
8296         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8297         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8298         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8299         (add_pending): Likewise.
8300         (parse_symbol): Likewise.
8301         (parse_partial_symbols): Likewise.
8302         (psymtab_to_symtab_1): Likewise.
8303         (new_psymtab): Likewise.
8304         (elfmdebug_build_psymtabs): Likewise.
8305         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8306         * objfiles.c (get_objfile_bfd_data): Likewise.
8307         (objfile_register_static_link): Likewise.
8308         * psymtab.c (allocate_psymtab): Likewise.
8309         * stabsread.c (read_member_functions): Likewise.
8310         * xcoffread.c (xcoff_end_psymtab): Likewise.
8311
8312 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8313
8314         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8315         compiler supports std::is_trivially_constructible.
8316         * common/poison.h: Include obstack.h.
8317         (IsMallocable): Define to is_trivially_constructible if the
8318         compiler supports it, define to true_type otherwise.
8319         (xobnew): New.
8320         (XOBNEW): Redefine.
8321         (xobnewvec): New.
8322         (XOBNEWVEC): Redefine.
8323         * gdb_obstack.h (obstack_zalloc): New.
8324         (OBSTACK_ZALLOC): Redefine.
8325         (obstack_calloc): New.
8326         (OBSTACK_CALLOC): Redefine.
8327         (obstack_new): New.
8328         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8329         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8330         gdbarch.c.
8331         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8332         obstack_calloc/obstack_zalloc.
8333         (gdbarch_obstack_zalloc): Remove.
8334         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8335
8336 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8337
8338         * stack.c (backtrace_command_1): Remove useless variable int i.
8339
8340 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8341
8342         * stack.c (print_frame_info): Fix comment.
8343
8344 2018-05-18  Tom Tromey  <tom@tromey.com>
8345
8346         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8347         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8348         (~dwarf2_per_objfile): Update
8349         (dwarf2_get_dwz_file): Use new.
8350         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8351         unique_ptr.
8352
8353 2018-05-18  Tom Tromey  <tom@tromey.com>
8354
8355         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8356         unique_ptr.
8357         * dwarf2read.c (struct dwp_file): Add constructor and
8358         initializers.
8359         (open_and_init_dwp_file): Return a unique_ptr.
8360         (dwarf2_per_objfile, create_dwp_hash_table)
8361         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8362         (lookup_dwo_unit_in_dwp): Update.
8363         (open_and_init_dwp_file, get_dwp_file): Update.
8364
8365 2018-05-18  Tom Tromey  <tom@tromey.com>
8366
8367         * dwarf2read.c (dwarf2_per_objfile): Update.
8368         (struct mapped_index): Add initializers.
8369         (dwarf2_read_index): Use new.
8370         (dw2_symtab_iter_init): Update.
8371         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8372         unique_ptr.
8373
8374 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8375
8376         * dwarf2read.c (mapped_index) <total_size>: Remove.
8377
8378 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8379
8380         * unittests/format_pieces-selftests.c (test_format_specifier):
8381         Add ARI comments.
8382
8383 2018-05-18  Tom Tromey  <tom@tromey.com>
8384
8385         * c-typeprint.c (maybe_print_hole): New function.
8386         (c_print_type_struct_field_offset): Update.
8387         (c_type_print_base_struct_union): Call maybe_print_hole.
8388
8389 2018-05-17  Keith Seitz  <keiths@redhat.com>
8390
8391         * breakpoint.c (build_bpstat_chain): New function, moved from
8392         bpstat_stop_status.
8393         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8394         If no stop chain is passed, call build_bpstat_chain to build it.
8395         * breakpoint.h (build_bpstat_chain): Declare.
8396         (bpstat_stop_status): Move documentation here from breakpoint.c.
8397         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8398         build the stop chain and pass it to skip_inline_frames.
8399         Pass this stop chain to bpstat_stop_status.
8400         * inline-frame.c: Include breakpoint.h.
8401         (stopped_by_user_bp_inline_frame): New function.
8402         (skip_inline_frames): Add parameter `stop_chain'.
8403         Move documention to inline-frame.h.
8404         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8405         whether the frame should be elided.
8406         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8407         Add moved documentation and update for new parameter.
8408
8409 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8410
8411         PR cli/14975
8412         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8413         unittests/format_pieces-selftests.c.
8414         * common/format.h (format_piece) <operator==>: New.
8415         (format_pieces) <operator[]>: Remove.
8416         * common/format.c (format_pieces::format_pieces): Handle \e.
8417         * unittests/format_pieces-selftests.c: New.
8418
8419 2018-05-17  Tom Tromey  <tom@tromey.com>
8420
8421         PR symtab/23010:
8422         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8423         (dw2_instantiate_symtab): Add skip_partial parameter.
8424         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8425         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8426         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8427         (dw2_expand_symtabs_matching_one)
8428         (dw2_find_pc_sect_compunit_symtab)
8429         (dw2_debug_names_lookup_symbol)
8430         (dw2_debug_names_expand_symtabs_for_function): Update.
8431         (init_cutu_and_read_dies): Add skip_partial parameter.
8432         (process_psymtab_comp_unit, build_type_psymtabs_1)
8433         (process_skeletonless_type_unit, load_partial_comp_unit)
8434         (psymtab_to_symtab_1): Update.
8435         (load_full_comp_unit): Add skip_partial parameter.
8436         (process_imported_unit_die, dwarf2_read_addr_index)
8437         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8438         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8439         (read_signatured_type): Update.
8440
8441 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * value.c (release_value): Remove unused variable.
8444         (record_latest_value): Likewise.
8445         (access_value_history): Likewise.
8446         (preserve_values): Likewise.
8447
8448 2018-05-17  Tom Tromey  <tom@tromey.com>
8449
8450         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8451         Initialize.
8452
8453 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8454
8455         PR gdb/22286
8456         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8457         Also handle registers whose width is not a multiple of
8458         PTRACE_TYPE_RET.
8459         (linux_nat_trad_target::store_register): Likewise.
8460
8461 2018-05-16  Tom Tromey  <tom@tromey.com>
8462
8463         * gdbcore.h (core_bfd): Redefine.
8464         * corelow.c (core_target::close): Update.
8465         (core_target_open): Update.
8466         * progspace.h (struct program_space) <cbfd>: Now a
8467         gdb_bfd_ref_ptr.
8468
8469 2018-05-16  Tom Tromey  <tom@tromey.com>
8470
8471         PR cli/19551:
8472         * symfile-add-flags.h (enum symfile_add_flags)
8473         <SYMFILE_NOT_FILENAME>: New constant.
8474         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8475         objfile name from BFD.
8476         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8477         * minidebug.c (find_separate_debug_file_in_section): Put
8478         ".gnu_debugdata" into BFD's file name.
8479
8480 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8481
8482         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8483         Remove.
8484
8485 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8486
8487         PR binutils/21446
8488         * aarch64-tdep.c (aarch64_analyze_prologue,
8489         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8490         Indicate not interested in errors.
8491
8492 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8493
8494         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8495         Supply the MIPS_ZERO_REGNUM register.
8496
8497 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8498
8499         * mips-tdep.c (mask_address_var): Make variable static.
8500
8501 2018-05-14  Tom Tromey  <tom@tromey.com>
8502
8503         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8504
8505 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8506
8507         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8508         FXSAVE_ADDR for the mxcsr register.
8509
8510 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8511
8512         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8513
8514 2018-05-11  Pedro Alves  <palves@redhat.com>
8515
8516         * corelow.c (core_target) <core_target>: No longer inline.
8517         Initialize m_core_gdbarch, m_core_vec and build the section table
8518         here.
8519         <~core_target>: New.
8520         <core_gdbarch, get_core_register_section>: New methods.
8521         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8522         factored out from ...
8523         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8524         (core_ops): Delete.
8525         (sniff_core_bfd): Add gdbarch parameter.
8526         (core_close): Delete, merged into ...
8527         (core_target::close): ... here.  Delete self.
8528         (core_close_cleanup): Delete.
8529         (core_target_open): Allocate a core_target on the heap.  Use a
8530         unique_ptr instead of a cleanup.  Bits moved into the core_target
8531         ctor.  Adjust to use core_target methods instead of globals.
8532         (get_core_register_section): Rename to ...
8533         (core_target::get_core_register_section): ... this and adjust.
8534         (struct get_core_registers_cb_data): New.
8535         (get_core_registers_cb): Use it.  Use bool.
8536         (core_target::fetch_registers, core_target::files_info)
8537         (core_target::xfer_partial, core_target::read_description)
8538         (core_target::pid_to, core_target::thread_name): Adjust to
8539         reference class fields instead of globals.
8540         * target.h (struct target_ops_deleter, target_ops_up): New.
8541
8542 2018-05-11  Pedro Alves  <palves@redhat.com>
8543
8544         * corefile.c (core_file_command): Move to corelow.c.
8545         * corelow.c (the_core_target): Delete.
8546         (core_file_command): Moved from corefile.c.  Check exec_bfd
8547         instead of the_core_target.  Use target_detach instead of calling
8548         into the_core_target directly.
8549         (maybe_say_no_core_file_now): New.
8550         (core_target::detach): Use it.
8551         (_initialize_corelow): Remove references to the_core_target.
8552         * gdbcore.h (the_core_target): Delete.
8553
8554 2018-05-11  Tom Tromey  <tromey@redhat.com>
8555             Pedro Alves  <palves@redhat.com>
8556
8557         * corefile.c (core_bfd): Remove.
8558         * gdbcore.h (core_bfd): Now a macro.
8559         * progspace.h (struct program_space) <cbfd>: New field.
8560
8561 2018-05-11  Tom Tromey  <tom@tromey.com>
8562
8563         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8564         gdb::def_vector.
8565
8566 2018-05-10  Tom Tromey  <tom@tromey.com>
8567
8568         * configure: Rebuild.
8569         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8570
8571 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8572
8573         PR server/23158:
8574         * regformats/regdat.sh: Adjust script, following the addition
8575         of the new expedite_regs parameter to init_target_desc.
8576
8577 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8578     
8579         PR gdb/23127
8580         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8581         set_gdbarch_significant_addr_bit.
8582         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8583         set_gdbarch_significant_addr_bit.
8584         * utils.c (address_significant): Update to sign extend addr.
8585
8586 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8587
8588         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8589         (xtensa_linux_init_abi): Limit tdep->num_regs by
8590         tdep->num_nopriv_regs.
8591         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8592         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8593         not initialized.
8594
8595 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8596
8597         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8598
8599 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8600
8601         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8602         (I387_MXCSR_INIT_VAL): New constant.
8603         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8604         buffer if it was supplied by the inferior.
8605         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8606         (i387_xsave_get_clear_bv): New function.
8607         (i387_supply_xsave): Only read x87 control registers from the
8608         xsave buffer if the feature is enabled, and the state will have
8609         been written, otherwise, provide a suitable default.
8610         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8611         including x87 control registers.  Update control registers if they
8612         have changed from the default value, and mark features as enabled
8613         as required.
8614         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8615
8616 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8617
8618         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8619
8620 2018-05-07  Tom Tromey  <tom@tromey.com>
8621
8622         * configure: Rebuild.
8623         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8624
8625 2018-05-07  Tom Tromey  <tom@tromey.com>
8626
8627         PR tdep/20362:
8628         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8629         bit.  Use correct value for VDIV.
8630
8631 2018-05-04  Tom Tromey  <tom@tromey.com>
8632
8633         * configure: Rebuild.
8634         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8635
8636 2018-05-04  Tom Tromey  <tom@tromey.com>
8637
8638         * linux-record.c (record_linux_system_call) <case
8639         RECORD_SYS_RECVFROM>: Add "break".
8640
8641 2018-05-04  Tom Tromey  <tom@tromey.com>
8642
8643         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8644         Add missing "break".
8645         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8646         Add missing "break".
8647
8648 2018-05-04  Tom Tromey  <tom@tromey.com>
8649
8650         * rs6000-tdep.c (ppc_process_record_op4)
8651         (ppc_process_record_op63): Add fall-through comment.
8652
8653 2018-05-04  Tom Tromey  <tom@tromey.com>
8654
8655         * i386-tdep.c (i386_process_record): Add fall-through comment.
8656
8657 2018-05-04  Tom Tromey  <tom@tromey.com>
8658
8659         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8660         comment.
8661
8662 2018-05-04  Tom Tromey  <tom@tromey.com>
8663
8664         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8665         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8666         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8667         comment.
8668         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8669         comment.
8670         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8671         comment.
8672
8673 2018-05-04  Tom Tromey  <tom@tromey.com>
8674
8675         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8676
8677 2018-05-04  Tom Tromey  <tom@tromey.com>
8678
8679         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8680         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8681         * symfile.c (section_is_mapped): Fix fall-through comment.
8682         * stabsread.c (define_symbol, read_member_functions): Fix
8683         fall-through comment.
8684         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8685         comment.
8686         * remote.c (remote_wait_as): Fix fall-through comment.
8687         * p-exp.y (yylex): Fix fall-through comment.
8688         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8689         comment.
8690         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8691         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8692         * jv-exp.y (yylex): Fix fall-through comment.
8693         * go-exp.y (lex_one_token): Fix fall-through comment.
8694         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8695         fall-through comment.
8696         * f-exp.y (yylex): Fix fall-through comment.
8697         * dwarf2read.c (process_die): Fix fall-through comments.
8698         * dbxread.c (process_one_symbol): Fix fall-through comment.
8699         * d-exp.y (lex_one_token): Fix fall-through comment.
8700         * cp-name-parser.y (yylex): Fix fall-through comment.
8701         * coffread.c (coff_symtab_read): Fix fall-through comment.
8702         * c-exp.y (lex_one_token): Fix fall-through comment.
8703         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8704         comment.
8705         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8706         comment.
8707
8708 2018-05-04  Tom Tromey  <tom@tromey.com>
8709
8710         PR python/22730:
8711         * NEWS: Mention gdb.execute change.
8712         * gdbcmd.h (execute_control_command): Don't declare.
8713         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8714         execute_control_commands, execute_control_commands_to_string.
8715         * cli/cli-script.h (execute_control_commands)
8716         (execute_control_commands_to_string): Declare.
8717         (execute_control_command): Add from_tty parameter.
8718         * cli/cli-script.c (execute_control_commands)
8719         (execute_control_commands_to_string): New functions.
8720         (execute_user_command): Use execute_control_commands.
8721         (execute_control_command_1): Add "from_tty" parameter.  Update.
8722         (execute_control_command): Likewise.
8723
8724 2018-05-04  Tom Tromey  <tom@tromey.com>
8725
8726         PR python/22731:
8727         * NEWS: Mention that breakpoint commands are writable.
8728         * python/py-breakpoint.c (bppy_set_commands): New function.
8729         (breakpoint_object_getset) <"commands">: Use it.
8730
8731 2018-05-04  Tom Tromey  <tom@tromey.com>
8732
8733         * tracepoint.c (actions_command): Update.
8734         * mi/mi-cmd-break.c (mi_command_line_array)
8735         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8736         (mi_read_next_line): Remove.
8737         (mi_cmd_break_commands): Update.
8738         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8739         function_view.
8740         * cli/cli-script.c (get_command_line): Update.
8741         (process_next_line): Use function_view.  Constify.
8742         (recurse_read_control_structure, read_command_lines)
8743         (read_command_lines_1): Change argument types to function_view.
8744         (do_define_command, document_command): Update.
8745         * breakpoint.h (check_tracepoint_command): Don't declare.
8746         * breakpoint.c (check_tracepoint_command): Remove.
8747         (commands_command_1, create_tracepoint_from_upload): Update.
8748
8749 2018-05-04  Tom Tromey  <tom@tromey.com>
8750
8751         PR gdb/11750:
8752         * cli/cli-script.h (enum command_control_type) <define_control>:
8753         New constant.
8754         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8755         (build_command_line, execute_control_command_1)
8756         (process_next_line): Likewise.
8757         (do_define_command): New function, extracted from define_command.
8758         (define_command): Use it.
8759
8760 2018-05-04  Tom Tromey  <tom@tromey.com>
8761
8762         * tracepoint.c (actions_command): Update.
8763         * cli/cli-script.h (read_command_lines): Update.
8764         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8765         (MAX_TMPBUF): Remove define.
8766         (define_command): Use string_printf.
8767         (document_command): Likewise.
8768         * breakpoint.c (commands_command_1): Update.
8769
8770 2018-05-04  Tom Tromey  <tom@tromey.com>
8771
8772         * top.c (execute_command): Update.
8773         * cli/cli-script.h (print_command_lines): Now varargs.
8774         * cli/cli-script.c (print_command_lines): Now varargs.
8775         (execute_control_command_1) <case while_control, case if_control>:
8776         Update.
8777
8778 2018-05-04  Tom Tromey  <tom@tromey.com>
8779
8780         * tracepoint.c (all_tracepoint_actions): Rename from
8781         all_tracepoint_actions_and_cleanup.  Change return type.
8782         (actions_command, encode_actions_1, encode_actions)
8783         (trace_dump_actions, tdump_command): Update.
8784         * remote.c (remote_download_command_source): Update.
8785         * python/python.c (gdbpy_eval_from_control_command)
8786         (python_command, python_interactive_command): Update.
8787         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8788         * guile/guile.c (guile_command)
8789         (gdbscm_eval_from_control_command, guile_command): Update.
8790         * compile/compile.c (compile_code_command)
8791         (compile_print_command, compile_to_object): Update.
8792         * cli/cli-script.h (struct command_lines_deleter): New.
8793         (counted_command_line): New typedef.
8794         (struct command_line): Add constructor, destructor.
8795         <body_list>: Remove.
8796         <body_list_0, body_list_1>: New members.
8797         (command_line_up): Remove typedef.
8798         (read_command_lines, read_command_lines_1, get_command_line):
8799         Update.
8800         (copy_command_lines): Don't declare.
8801         * cli/cli-script.c (build_command_line): Use "new".
8802         (get_command_line): Return counted_command_line.
8803         (print_command_lines, execute_user_command)
8804         (execute_control_command_1, while_command, if_command): Update.
8805         (realloc_body_list): Remove.
8806         (process_next_line, recurse_read_control_structure): Update.
8807         (read_command_lines, read_command_lines_1): Return counted_command_line.
8808         (free_command_lines): Use "delete".
8809         (copy_command_lines): Remove.
8810         (define_command, document_command, show_user_1): Update.
8811         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8812         a counted_command_line.
8813         * breakpoint.h (counted_command_line): Remove typedef.
8814         (breakpoint_set_commands): Update.
8815         * breakpoint.c (check_no_tracepoint_commands)
8816         (validate_commands_for_breakpoint): Update.
8817         (breakpoint_set_commands): Change commands to be a
8818         counted_command_line.
8819         (commands_command_1, update_dprintf_command_list)
8820         (create_tracepoint_from_upload): Update.
8821
8822 2018-05-04  Tom Tromey  <tom@tromey.com>
8823
8824         * cli/cli-decode.h (cmd_list_element): New constructor.
8825         (~cmd_list_element): New destructor.
8826         (struct cmd_list_element): Add initializers.
8827         * cli/cli-decode.c (do_add_cmd): Use "new".
8828         (delete_cmd): Use "delete".
8829
8830 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8831             Pedro Alves <palves@redhat.com>
8832
8833         PR breakpoints/19806 and support for PR external/20207.
8834         * NEWS: Mention Aarch64 watchpoint improvements.
8835         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8836         watchpoints and PR external/20207 watchpoints.
8837         * nat/aarch64-linux-hw-point.c
8838         (kernel_supports_any_contiguous_range): New.
8839         (aarch64_watchpoint_offset): New.
8840         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8841         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8842         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8843         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8844         next_addr_orig_p.  Support PR external/20207 watchpoints.
8845         (aarch64_downgrade_regs): New.
8846         (aarch64_dr_state_insert_one_point): New parameters offset and
8847         addr_orig.
8848         (aarch64_dr_state_remove_one_point): Likewise.
8849         (aarch64_handle_breakpoint): Update caller.
8850         (aarch64_handle_aligned_watchpoint): Likewise.
8851         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8852         aligned_offset.
8853         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8854         aarch64_downgrade_regs.
8855         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8856         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8857         (DR_CONTROL_MASK): ... this.
8858         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8859         (unsigned int aarch64_watchpoint_offset): New prototype.
8860         (aarch64_linux_set_debug_regs): Remove const from state.
8861         * utils.c (align_up, align_down): Move to ...
8862         * common/common-utils.c (align_up, align_down): ... here.
8863         * utils.h (align_up, align_down): Move to ...
8864         * common/common-utils.h (align_up, align_down): ... here.
8865
8866 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8867
8868         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8869         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8870         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8871         Re-implement to match the ABI as summarized in GCC's
8872         gcc/config/sparc/sparc.c.  All callers updated.
8873         (sparc32_store_arguments): Remove assertion.
8874
8875 2018-05-04  Tom Tromey  <tom@tromey.com>
8876
8877         * printcmd.c: Don't include tui.h.
8878         (decode_format): Use skip_spaces.
8879
8880 2018-05-04  Tom Tromey  <tom@tromey.com>
8881
8882         PR gdb/22619:
8883         * printcmd.c (last_count): New global.
8884         (x_command): Use saved count when repeating.
8885
8886 2018-05-04  Tom Tromey  <tom@tromey.com>
8887
8888         * nto-procfs.c (do_closedir_cleanup): Remove.
8889         (procfs_pidlist): Use gdb_dir_up.
8890         * procfs.c (do_closedir_cleanup): Remove.
8891         (proc_update_threads): Use gdb_dir_up.
8892         * common/filestuff.h (struct gdb_dir_deleter): New.
8893         (gdb_dir_up): New typedef.
8894
8895 2018-05-04  Tom Tromey  <tom@tromey.com>
8896
8897         * ada-lang.c (print_mention_exception): Use std::string.
8898
8899 2018-05-04  Tom Tromey  <tom@tromey.com>
8900
8901         * ada-lang.c (create_excep_cond_exprs): Update.
8902         (ada_exception_catchpoint_cond_string): Use std::string.
8903
8904 2018-05-04  Tom Tromey  <tom@tromey.com>
8905
8906         * ada-lang.c (xget_renaming_scope): Return std::string.
8907         (old_renaming_is_invisible): Update.
8908
8909 2018-05-04  Tom Tromey  <tom@tromey.com>
8910
8911         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8912         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8913
8914 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8915
8916         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8917
8918 2018-05-04  Tom Tromey  <tom@tromey.com>
8919
8920         * remote.c (remote_query_supported_append): Change type.
8921         (remote_check_symbols): Update.
8922
8923 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8924
8925         PR gdb/11420
8926         * configure.ac: Prepend libpython.
8927         * python/python-config.py: Likewise.
8928         * configure: Regenerate.
8929
8930 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8931
8932         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8933
8934 2018-05-03  Pedro Alves  <palves@redhat.com>
8935
8936         * s390-linux-nat.c
8937         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8938         override.  Write 'true' instead of '1'.
8939         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8940         declaration.
8941
8942 2018-05-02  Pedro Alves  <palves@redhat.com>
8943
8944         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8945         add_inf_child_target.
8946         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8947         add_inf_child_target.
8948         * aix-thread.c (aix_thread_target_info): New.
8949         (aix_thread_target) <shortname, longname, doc>: Delete.
8950         <info>: New.
8951         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8952         add_inf_child_target.
8953         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8954         add_inf_child_target.
8955         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8956         add_inf_child_target.
8957         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8958         add_inf_child_target.
8959         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8960         add_inf_child_target.
8961         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8962         add_inf_child_target.
8963         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8964         add_inf_child_target.
8965         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8966         add_inf_child_target.
8967         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8968         add_inf_child_target.
8969         * bfd-target.c (target_bfd_target_info): New.
8970         (target_bfd) <shortname, longname, doc>: Delete.
8971         <info>: New.
8972         * bsd-kvm.c (bsd_kvm_target_info): New.
8973         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8974         <info>: New.
8975         (bsd_kvm_target::open): Rename to ...
8976         (bsd_kvm_target_open): ... this.  Adjust.
8977         * bsd-uthread.c (bsd_uthread_target_info): New.
8978         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8979         <info>: New.
8980         * corefile.c (core_file_command): Adjust.
8981         * corelow.c (core_target_info): New.
8982         (core_target) <shortname, longname, doc>: Delete.
8983         <info>: New.
8984         (core_target::open): Rename to ...
8985         (core_target_open): ... this.  Adjust.
8986         * ctf.c (ctf_target_info): New.
8987         (ctf_target) <shortname, longname, doc>: Delete.
8988         <info>: New.
8989         (ctf_target::open): Rename to ...
8990         (ctf_target_open): ... this.
8991         (_initialize_ctf): Adjust.
8992         * exec.c (exec_target_info): New.
8993         (exec_target) <shortname, longname, doc>: Delete.
8994         <info>: New.
8995         (exec_target::open): Rename to ...
8996         (exec_target_open): ... this.
8997         * gdbcore.h (core_target_open): Declare.
8998         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8999         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9000         add_inf_child_target.
9001         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9002         add_inf_child_target.
9003         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9004         add_inf_child_target.
9005         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9006         add_inf_child_target.
9007         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9008         add_inf_child_target.
9009         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9010         add_inf_child_target.
9011         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9012         add_inf_child_target.
9013         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9014         add_inf_child_target.
9015         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9016         add_inf_child_target.
9017         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9018         add_inf_child_target.
9019         * inf-child.c (inf_child_target_info): New.
9020         (inf_child_target::info): New.
9021         (inf_child_open_target): Remove 'target' parameter.  Use
9022         get_native_target instead.
9023         (inf_child_target::open): Delete.
9024         (add_inf_child_target): New.
9025         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9026         Delete.
9027         <info>: New.
9028         (add_inf_child_target): Declare.
9029         (inf_child_open_target): Declare.
9030         * linux-thread-db.c (thread_db_target_info): New.
9031         (thread_db_target) <shortname, longname, doc>: Delete.
9032         <info>: New.
9033         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9034         add_inf_child_target.
9035         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9036         add_inf_child_target.
9037         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9038         add_inf_child_target.
9039         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9040         add_inf_child_target.
9041         * make-target-delegates (print_class): Adjust.
9042         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9043         add_inf_child_target.
9044         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9045         add_inf_child_target.
9046         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9047         add_inf_child_target.
9048         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9049         add_inf_child_target.
9050         * nto-procfs.c (nto_native_target_info): New.
9051         (nto_procfs_target_native) <shortname, longname, doc>:
9052         Delete.
9053         <info>: New.
9054         (nto_procfs_target_info): New.
9055         (nto_procfs_target_procfs) <shortname, longname, doc>:
9056         Delete.
9057         <info>: New.
9058         (init_procfs_targets): Adjust.
9059         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9060         add_inf_child_target.
9061         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9062         add_inf_child_target.
9063         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9064         add_inf_child_target.
9065         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9066         add_inf_child_target.
9067         * ravenscar-thread.c (ravenscar_target_info): New.
9068         (ravenscar_thread_target) <shortname, longname, doc>:
9069         Delete.
9070         <info>: New.
9071         * record-btrace.c (record_btrace_target_info):
9072         (record_btrace_target) <shortname, longname, doc>: Delete.
9073         <info>: New.
9074         (record_btrace_target::open): Rename to ...
9075         (record_btrace_target_open): ... this.  Adjust.
9076         * record-full.c (record_longname, record_doc): New.
9077         (record_full_base_target) <shortname, longname, doc>: Delete.
9078         <info>: New.
9079         (record_full_target_info): New.
9080         (record_full_target): <shortname>: Delete.
9081         <info>: New.
9082         (record_full_core_open_1, record_full_open_1): Update comments.
9083         (record_full_base_target::open): Rename to ...
9084         (record_full_open): ... this.
9085         (cmd_record_full_restore): Update.
9086         (_initialize_record_full): Update.
9087         * remote-sim.c (remote_sim_target_info): New.
9088         (gdbsim_target) <shortname, longname, doc>: Delete.
9089         <info>: New.
9090         (gdbsim_target::open): Rename to ...
9091         (gdbsim_target_open): ... this.
9092         (_initialize_remote_sim): Adjust.
9093         * remote.c (remote_doc): New.
9094         (remote_target_info): New.
9095         (remote_target) <shortname, longname, doc>: Delete.
9096         <info>: New.
9097         (extended_remote_target_info): New.
9098         (extended_remote_target) <shortname, longname, doc>: Delete.
9099         <info>: New.
9100         (remote_target::open_1): Make static.  Adjust.
9101         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9102         * s390-linux-nat.c (_initialize_s390_nat): Use
9103         add_inf_child_target.
9104         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9105         add_inf_child_target.
9106         * sol-thread.c (thread_db_target_info): New.
9107         (sol_thread_target) <shortname, longname, doc>: Delete.
9108         <info>: New.
9109         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9110         add_inf_child_target.
9111         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9112         add_inf_child_target.
9113         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9114         add_inf_child_target.
9115         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9116         add_inf_child_target.
9117         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9118         add_inf_child_target.
9119         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9120         add_inf_child_target.
9121         * spu-linux-nat.c (_initialize_spu_nat): Use
9122         add_inf_child_target.
9123         * spu-multiarch.c (spu_multiarch_target_info): New.
9124         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9125         <info>: New.
9126         * target-delegates.c: Regenerate.
9127         * target.c: Include <unordered_map>.
9128         (target_ops_p): Delete.
9129         (DEF_VEC_P(target_ops_p)): Delete.
9130         (target_factories): New.
9131         (test_target_info): New.
9132         (test_target_ops::info): New.
9133         (open_target): Adjust to use target_factories.
9134         (add_target_with_completer): Rename to ...
9135         (add_target): ... this.  Change prototype.  Register target_info
9136         and open callback in target_factories.  Register target_info in
9137         command context instead of target_ops.
9138         (add_target): Delete old implementation.
9139         (add_deprecated_target_alias): Change prototype.  Adjust.
9140         (the_native_target): New.
9141         (set_native_target, get_native_target): New.
9142         (find_default_run_target): Use the_native_target.
9143         (find_attach_target, find_run_target): Simplify.
9144         (target_ops::open): Delete.
9145         (dummy_target_info): New.
9146         (dummy_target::shortname, dummy_target::longname)
9147         (dummy_target::doc): Delete.
9148         (dummy_target::info): New.
9149         (debug_target::shortname, debug_target::longname)
9150         (debug_target::doc): Delete.
9151         (debug_target::info): New.
9152         * target.h (struct target_info): New.
9153         (target_ops::~target_ops): Add comment.
9154         (target_ops::info): New.
9155         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9156         longer virtual.  Implement in terms of target_info.
9157         (set_native_target, get_native_target): Declare.
9158         (target_open_ftype): New.
9159         (add_target, add_target_with_completer)
9160         (add_deprecated_target_alias): Change prototype.
9161         (test_target) <shortname, longname, doc>: Delete.
9162         <info>: New.
9163         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9164         add_inf_child_target.
9165         * tracefile-tfile.c (tfile_target_info): New.
9166         (tfile_target) <shortname, longname, doc>: Delete.
9167         <info>: New.
9168         (tfile_target::open): Rename to ...
9169         (tfile_target_open): ... this.
9170         (_initialize_tracefile_tfile): Adjust.
9171         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9172         add_inf_child_target.
9173         * windows-nat.c (_initialize_windows_nat): Use
9174         add_inf_child_target.
9175         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9176         add_inf_child_target.
9177
9178 2018-05-02  Pedro Alves  <palves@redhat.com>
9179
9180         * linux-nat.h (linux_nat_target) <low_new_thread,
9181         low_delete_thread, low_new_fork, low_forget_process,
9182         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9183         New virtual methods.
9184         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9185         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9186         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9187         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9188         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9189         Delete.
9190         * linux-fork.c (delete_fork): Adjust to call low method.
9191         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9192         (linux_nat_new_fork, linux_nat_forget_process_hook)
9193         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9194         (linux_nat_status_is_event):
9195         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9196         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9197         to call low method.
9198         (sigtrap_is_event): Rename to ...
9199         (linux_nat_target::low_status_is_event): ... this.
9200         (linux_nat_set_status_is_event): Delete.
9201         (save_stop_reason, linux_nat_wait_1)
9202         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9203         low methods.
9204         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9205         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9206         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9207         (linux_nat_set_prepare_to_resume): Delete.
9208         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9209         low virtual methods.
9210         * amd64-linux-nat.c: Likewise.
9211         * arm-linux-nat.c: Likewise.
9212         * i386-linux-nat.c: Likewise.
9213         * ia64-linux-nat.c: Likewise.
9214         * mips-linux-nat.c: Likewise.
9215         * ppc-linux-nat.c: Likewise.
9216         * s390-linux-nat.c: Likewise.
9217         * sparc64-linux-nat.c: Likewise.
9218         * x86-linux-nat.c: Likewise.
9219         * x86-linux-nat.h: Include "nat/x86-linux.h".
9220         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9221         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9222         Override methods.
9223
9224 2018-05-02  Pedro Alves  <palves@redhat.com>
9225
9226         * target.h (target_ops)
9227         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9228         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9229         stopped_by_watchpoint, have_continuable_watchpoint,
9230         stopped_data_address, watchpoint_addr_within_range,
9231         can_accel_watchpoint_condition, can_run, thread_alive,
9232         has_all_memory, has_memory, has_stack, has_registers,
9233         has_execution, can_async_p, is_async_p, supports_non_stop,
9234         always_non_stop_p, can_execute_reverse, supports_multi_process,
9235         supports_enable_disable_tracepoint,
9236         supports_disable_randomization, supports_string_tracing,
9237         supports_evaluation_of_breakpoint_conditions,
9238         can_run_breakpoint_commands, filesystem_is_local,
9239         can_download_tracepoint, get_trace_state_variable_value,
9240         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9241         record_is_replaying, record_will_replay,
9242         augmented_libraries_svr4_read>: Adjust to return bool.
9243         * aarch64-linux-nat.c: All implementations adjusted.
9244         * aix-thread.c: All implementations adjusted.
9245         * arm-linux-nat.c: All implementations adjusted.
9246         * breakpoint.c: All implementations adjusted.
9247         * bsd-kvm.c: All implementations adjusted.
9248         * bsd-uthread.c: All implementations adjusted.
9249         * corelow.c: All implementations adjusted.
9250         * ctf.c: All implementations adjusted.
9251         * darwin-nat.c: All implementations adjusted.
9252         * darwin-nat.h: All implementations adjusted.
9253         * exec.c: All implementations adjusted.
9254         * fbsd-nat.c: All implementations adjusted.
9255         * fbsd-nat.h: All implementations adjusted.
9256         * gnu-nat.c: All implementations adjusted.
9257         * gnu-nat.h: All implementations adjusted.
9258         * go32-nat.c: All implementations adjusted.
9259         * ia64-linux-nat.c: All implementations adjusted.
9260         * inf-child.c: All implementations adjusted.
9261         * inf-child.h: All implementations adjusted.
9262         * inf-ptrace.c: All implementations adjusted.
9263         * inf-ptrace.h: All implementations adjusted.
9264         * linux-nat.c: All implementations adjusted.
9265         * linux-nat.h: All implementations adjusted.
9266         * mips-linux-nat.c: All implementations adjusted.
9267         * nto-procfs.c: All implementations adjusted.
9268         * ppc-linux-nat.c: All implementations adjusted.
9269         * procfs.c: All implementations adjusted.
9270         * ravenscar-thread.c: All implementations adjusted.
9271         * record-btrace.c: All implementations adjusted.
9272         * record-full.c: All implementations adjusted.
9273         * remote-sim.c: All implementations adjusted.
9274         * remote.c: All implementations adjusted.
9275         * s390-linux-nat.c: All implementations adjusted.
9276         * sol-thread.c: All implementations adjusted.
9277         * spu-multiarch.c: All implementations adjusted.
9278         * target-delegates.c: All implementations adjusted.
9279         * target.c: All implementations adjusted.
9280         * target.h: All implementations adjusted.
9281         * tracefile-tfile.c: All implementations adjusted.
9282         * tracefile.c: All implementations adjusted.
9283         * tracefile.h: All implementations adjusted.
9284         * windows-nat.c: All implementations adjusted.
9285         * x86-linux-nat.h: All implementations adjusted.
9286         * x86-nat.h: All implementations adjusted.
9287
9288 2018-05-02  Pedro Alves  <palves@redhat.com>
9289
9290         * make-target-delegates (scan_target_h): Don't trim lines here.
9291         Replace sequences of tabs and/or whitespace with a single
9292         whitespace.
9293         (top level, parsing methods): Trim each line before processing it
9294         here.
9295
9296 2018-05-02  Pedro Alves  <palves@redhat.com>
9297             John Baldwin  <jhb@freebsd.org>
9298
9299         * target.h (enum strata) <debug_stratum>: New.
9300         (struct target_ops) <all delegation methods>: Replace by C++
9301         virtual methods, and drop "to_" prefix.  All references updated
9302         throughout.
9303         <to_shortname, to_longname, to_doc, to_data,
9304         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9305         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9306         virtual methods.  All references updated throughout.
9307         <can_attach, supports_terminal_ours, can_create_inferior,
9308         get_thread_control_capabilities, attach_no_wait>: New
9309         virtual methods.
9310         <insert_breakpoint, remove_breakpoint>: Now
9311         TARGET_DEFAULT_NORETURN methods.
9312         <info_proc>: Now returns bool.
9313         <to_magic>: Delete.
9314         (OPS_MAGIC): Delete.
9315         (current_target): Delete.  All references replaced by references
9316         to ...
9317         (target_stack): ... this.  New.
9318         (target_shortname, target_longname): Adjust.
9319         (target_can_run): Now a function declaration.
9320         (default_child_has_all_memory, default_child_has_memory)
9321         (default_child_has_stack, default_child_has_registers)
9322         (default_child_has_execution): Remove target_ops parameter.
9323         (complete_target_initialization): Delete.
9324         (memory_breakpoint_target): New template class.
9325         (test_target_ops): Refactor as a C++ class with virtual methods.
9326         * make-target-delegates (NAME_PART): Tighten.
9327         (POINTER_PART, CP_SYMBOL): New.
9328         (SIMPLE_RETURN_PART): Reimplement.
9329         (VEC_RETURN_PART): Expect less.
9330         (RETURN_PART, VIRTUAL_PART): New.
9331         (METHOD): Adjust to C++ virtual methods.
9332         (scan_target_h): Remove reference to C99.
9333         (dname): Output "target_ops::" prefix.
9334         (write_function_header): Adjust to output a C++ class method.
9335         (write_declaration): New.
9336         (write_delegator): Adjust to output a C++ class method.
9337         (tdname): Output "dummy_target::" prefix.
9338         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9339         method.
9340         (tdefault_names, debug_names): Delete.
9341         (return_types, tdefaults, styles, argtypes_array): New.
9342         (top level): All methods are delegators.
9343         (print_class): New.
9344         (top level): Print dummy_target and debug_target classes.
9345         * target-delegates.c: Regenerate.
9346         * target-debug.h (target_debug_print_enum_info_proc_what)
9347         (target_debug_print_thread_control_capabilities)
9348         (target_debug_print_thread_info_p): New.
9349         * target.c (dummy_target): Delete.
9350         (the_dummy_target, the_debug_target): New.
9351         (target_stack): Now extern.
9352         (set_targetdebug): Push/unpush debug target.
9353         (default_child_has_all_memory, default_child_has_memory)
9354         (default_child_has_stack, default_child_has_registers)
9355         (default_child_has_execution): Remove target_ops parameter.
9356         (complete_target_initialization): Delete.
9357         (add_target_with_completer): No longer call
9358         complete_target_initialization.
9359         (target_supports_terminal_ours): Use regular delegation.
9360         (update_current_target): Delete.
9361         (push_target): No longer check magic number.  Don't call
9362         update_current_target.
9363         (unpush_target): Don't call update_current_target.
9364         (target_is_pushed): No longer check magic number.
9365         (target_require_runnable): Skip for all stratums over
9366         process_stratum.
9367         (target_ops::info_proc): New.
9368         (target_info_proc): Use find_target_at and
9369         find_default_run_target.
9370         (target_supports_disable_randomization): Use regular delegation.
9371         (target_get_osdata): Use find_target_at.
9372         (target_ops::open, target_ops::close, target_ops::can_attach)
9373         (target_ops::attach, target_ops::can_create_inferior)
9374         (target_ops::create_inferior, target_ops::can_run)
9375         (target_can_run): New.
9376         (default_fileio_target): Use regular delegation.
9377         (target_ops::fileio_open, target_ops::fileio_pwrite)
9378         (target_ops::fileio_pread, target_ops::fileio_fstat)
9379         (target_ops::fileio_close, target_ops::fileio_unlink)
9380         (target_ops::fileio_readlink): New.
9381         (target_fileio_open_1, target_fileio_unlink)
9382         (target_fileio_readlink): Always call the target method.  Handle
9383         FILEIO_ENOSYS.
9384         (return_zero, return_zero_has_execution): Delete.
9385         (init_dummy_target): Delete.
9386         (dummy_target::dummy_target, dummy_target::shortname)
9387         (dummy_target::longname, dummy_target::doc)
9388         (debug_target::debug_target, debug_target::shortname)
9389         (debug_target::longname, debug_target::doc): New.
9390         (target_supports_delete_record): Use regular delegation.
9391         (setup_target_debug): Delete.
9392         (maintenance_print_target_stack): Skip debug_stratum.
9393         (initialize_targets): Instantiate the_dummy_target and
9394         the_debug_target.
9395         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9396         use target_stack.
9397         (target_auxv_search, fprint_target_auxv): Adjust.
9398         (info_auxv_command): Adjust to use target_stack.
9399         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9400         * exceptions.c (print_flush): Handle a NULL target_stack.
9401         * regcache.c (target_ops_no_register): Refactor as class with
9402         virtual methods.
9403
9404         * exec.c (exec_target): New class.
9405         (exec_ops): Now an exec_target.
9406         (exec_open, exec_close_1, exec_get_section_table)
9407         (exec_xfer_partial, exec_files_info, exec_has_memory)
9408         (exec_make_note_section): Refactor as exec_target methods.
9409         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9410         Delete.
9411         (exec_target::find_memory_regions): New.
9412         (_initialize_exec): Don't call init_exec_ops.
9413         * gdbcore.h (exec_file_clear): Delete.
9414
9415         * corefile.c (core_target): Delete.
9416         (core_file_command): Adjust.
9417         * corelow.c (core_target): New class.
9418         (the_core_target): New.
9419         (core_close): Remove target_ops parameter.
9420         (core_close_cleanup): Adjust.
9421         (core_target::close): New.
9422         (core_open, core_detach, get_core_registers, core_files_info)
9423         (core_xfer_partial, core_thread_alive, core_read_description)
9424         (core_pid_to_str, core_thread_name, core_has_memory)
9425         (core_has_stack, core_has_registers, core_info_proc): Rework as
9426         core_target methods.
9427         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9428         (_initialize_corelow): Initialize the_core_target.
9429         * gdbcore.h (core_target): Delete.
9430         (the_core_target): New.
9431
9432         * ctf.c: (ctf_target): New class.
9433         (ctf_ops): Now a ctf_target.
9434         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9435         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9436         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9437         methods.
9438         (init_ctf_ops): Delete.
9439         (_initialize_ctf): Don't call it.
9440         * tracefile-tfile.c (tfile_target): New class.
9441         (tfile_ops): Now a tfile_target.
9442         (tfile_open, tfile_close, tfile_files_info)
9443         (tfile_get_tracepoint_status, tfile_trace_find)
9444         (tfile_fetch_registers, tfile_xfer_partial)
9445         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9446         Refactor as tfile_target methods.
9447         (tfile_xfer_partial_features): Remove target_ops parameter.
9448         (init_tfile_ops): Delete.
9449         (_initialize_tracefile_tfile): Don't call it.
9450         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9451         (tracefile_has_stack, tracefile_has_registers)
9452         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9453         tracefile_target methods.
9454         (init_tracefile_ops): Delete.
9455         (tracefile_target::tracefile_target): New.
9456         * tracefile.h: Include "target.h".
9457         (tracefile_target): New class.
9458         (init_tracefile_ops): Delete.
9459
9460         * spu-multiarch.c (spu_multiarch_target): New class.
9461         (spu_ops): Now a spu_multiarch_target.
9462         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9463         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9464         (spu_search_memory, spu_mourn_inferior): Refactor as
9465         spu_multiarch_target methods.
9466         (init_spu_ops): Delete.
9467         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9468         complete_target_initialization.
9469
9470         * ravenscar-thread.c (ravenscar_thread_target): New class.
9471         (ravenscar_ops): Now a ravenscar_thread_target.
9472         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9473         (ravenscar_thread_alive, ravenscar_pid_to_str)
9474         (ravenscar_fetch_registers, ravenscar_store_registers)
9475         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9476         (ravenscar_stopped_by_hw_breakpoint)
9477         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9478         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9479         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9480         methods.
9481         (init_ravenscar_thread_ops): Delete.
9482         (_initialize_ravenscar): Remove references to
9483         init_ravenscar_thread_ops and complete_target_initialization.
9484
9485         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9486         (bsd_uthread_target): New class.
9487         (bsd_uthread_ops): Now a bsd_uthread_target.
9488         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9489         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9490         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9491         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9492         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9493         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9494         (bsd_uthread_target): Delete function.
9495         (_initialize_bsd_uthread): Remove reference to
9496         complete_target_initialization.
9497
9498         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9499         (target_bfd): ... this new class.
9500         (target_bfd_xfer_partial, target_bfd_get_section_table)
9501         (target_bfd_close): Refactor as target_bfd methods.
9502         (target_bfd::~target_bfd): New.
9503         (target_bfd_reopen): Adjust.
9504         (target_bfd::close): New.
9505
9506         * record-btrace.c (record_btrace_target): New class.
9507         (record_btrace_ops): Now a record_btrace_target.
9508         (record_btrace_open, record_btrace_stop_recording)
9509         (record_btrace_disconnect, record_btrace_close)
9510         (record_btrace_async, record_btrace_info)
9511         (record_btrace_insn_history, record_btrace_insn_history_range)
9512         (record_btrace_insn_history_from, record_btrace_call_history)
9513         (record_btrace_call_history_range)
9514         (record_btrace_call_history_from, record_btrace_record_method)
9515         (record_btrace_is_replaying, record_btrace_will_replay)
9516         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9517         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9518         (record_btrace_store_registers, record_btrace_prepare_to_store)
9519         (record_btrace_to_get_unwinder)
9520         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9521         (record_btrace_commit_resume, record_btrace_wait)
9522         (record_btrace_stop, record_btrace_can_execute_reverse)
9523         (record_btrace_stopped_by_sw_breakpoint)
9524         (record_btrace_supports_stopped_by_sw_breakpoint)
9525         (record_btrace_stopped_by_hw_breakpoint)
9526         (record_btrace_supports_stopped_by_hw_breakpoint)
9527         (record_btrace_update_thread_list, record_btrace_thread_alive)
9528         (record_btrace_goto_begin, record_btrace_goto_end)
9529         (record_btrace_goto, record_btrace_stop_replaying_all)
9530         (record_btrace_execution_direction)
9531         (record_btrace_prepare_to_generate_core)
9532         (record_btrace_done_generating_core): Refactor as
9533         record_btrace_target methods.
9534         (init_record_btrace_ops): Delete.
9535         (_initialize_record_btrace): Remove reference to
9536         init_record_btrace_ops.
9537         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9538         the execution_direction global.
9539         (record_full_base_target, record_full_target)
9540         (record_full_core_target): New classes.
9541         (record_full_ops): Now a record_full_target.
9542         (record_full_core_ops): Now a record_full_core_target.
9543         (record_full_target::detach, record_full_target::disconnect)
9544         (record_full_core_target::disconnect)
9545         (record_full_target::mourn_inferior, record_full_target::kill):
9546         New.
9547         (record_full_open, record_full_close, record_full_async): Refactor
9548         as methods of the record_full_base_target class.
9549         (record_full_resume, record_full_commit_resume): Refactor
9550         as methods of the record_full_target class.
9551         (record_full_wait, record_full_stopped_by_watchpoint)
9552         (record_full_stopped_data_address)
9553         (record_full_stopped_by_sw_breakpoint)
9554         (record_full_supports_stopped_by_sw_breakpoint)
9555         (record_full_stopped_by_hw_breakpoint)
9556         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9557         methods of the record_full_base_target class.
9558         (record_full_store_registers, record_full_xfer_partial)
9559         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9560         Refactor as methods of the record_full_target class.
9561         (record_full_can_execute_reverse, record_full_get_bookmark)
9562         (record_full_goto_bookmark, record_full_execution_direction)
9563         (record_full_record_method, record_full_info, record_full_delete)
9564         (record_full_is_replaying, record_full_will_replay)
9565         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9566         (record_full_stop_replaying): Refactor as methods of the
9567         record_full_base_target class.
9568         (record_full_core_resume, record_full_core_kill)
9569         (record_full_core_fetch_registers)
9570         (record_full_core_prepare_to_store)
9571         (record_full_core_store_registers, record_full_core_xfer_partial)
9572         (record_full_core_insert_breakpoint)
9573         (record_full_core_remove_breakpoint)
9574         (record_full_core_has_execution): Refactor
9575         as methods of the record_full_core_target class.
9576         (record_full_base_target::supports_delete_record): New.
9577         (init_record_full_ops): Delete.
9578         (init_record_full_core_ops): Delete.
9579         (record_full_save): Refactor as method of the
9580         record_full_base_target class.
9581         (_initialize_record_full): Remove references to
9582         init_record_full_ops and init_record_full_core_ops.
9583
9584         * remote.c (remote_target, extended_remote_target): New classes.
9585         (remote_ops): Now a remote_target.
9586         (extended_remote_ops): Now an extended_remote_target.
9587         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9588         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9589         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9590         (remote_pass_signals, remote_set_syscall_catchpoint)
9591         (remote_program_signals, )
9592         (remote_thread_always_alive): Remove target_ops parameter.
9593         (remote_thread_alive, remote_thread_name)
9594         (remote_update_thread_list, remote_threads_extra_info)
9595         (remote_static_tracepoint_marker_at)
9596         (remote_static_tracepoint_markers_by_strid)
9597         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9598         (remote_open): Refactor as methods of remote_target.
9599         (extended_remote_open, extended_remote_detach)
9600         (extended_remote_attach, extended_remote_post_attach):
9601         (extended_remote_supports_disable_randomization)
9602         (extended_remote_create_inferior): : Refactor as method of
9603         extended_remote_target.
9604         (remote_set_permissions, remote_open_1, remote_detach)
9605         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9606         (remote_resume, remote_commit_resume, remote_stop)
9607         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9608         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9609         (remote_prepare_to_store, remote_store_registers)
9610         (remote_flash_erase, remote_flash_done, remote_files_info)
9611         (remote_kill, remote_mourn, remote_insert_breakpoint)
9612         (remote_remove_breakpoint, remote_insert_watchpoint)
9613         (remote_watchpoint_addr_within_range)
9614         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9615         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9616         (remote_supports_stopped_by_sw_breakpoint)
9617         (remote_stopped_by_hw_breakpoint)
9618         (remote_supports_stopped_by_hw_breakpoint)
9619         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9620         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9621         (remote_verify_memory): Refactor as methods of remote_target.
9622         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9623         parameter.
9624         (remote_xfer_partial, remote_get_memory_xfer_limit)
9625         (remote_search_memory, remote_rcmd, remote_memory_map)
9626         (remote_pid_to_str, remote_get_thread_local_address)
9627         (remote_get_tib_address, remote_read_description): Refactor as
9628         methods of remote_target.
9629         (remote_target::fileio_open, remote_target::fileio_pwrite)
9630         (remote_target::fileio_pread, remote_target::fileio_close): New.
9631         (remote_hostio_readlink, remote_hostio_fstat)
9632         (remote_filesystem_is_local, remote_can_execute_reverse)
9633         (remote_supports_non_stop, remote_supports_disable_randomization)
9634         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9635         (remote_supports_enable_disable_tracepoint)
9636         (remote_supports_string_tracing)
9637         (remote_can_run_breakpoint_commands, remote_trace_init)
9638         (remote_download_tracepoint, remote_can_download_tracepoint)
9639         (remote_download_trace_state_variable, remote_enable_tracepoint)
9640         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9641         (remote_trace_start, remote_get_trace_status)
9642         (remote_get_tracepoint_status, remote_trace_stop)
9643         (remote_trace_find, remote_get_trace_state_variable_value)
9644         (remote_save_trace_data, remote_get_raw_trace_data)
9645         (remote_set_disconnected_tracing, remote_core_of_thread)
9646         (remote_set_circular_trace_buffer, remote_traceframe_info)
9647         (remote_get_min_fast_tracepoint_insn_len)
9648         (remote_set_trace_buffer_size, remote_set_trace_notes)
9649         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9650         (remote_disable_btrace, remote_teardown_btrace)
9651         (remote_read_btrace, remote_btrace_conf)
9652         (remote_augmented_libraries_svr4_read, remote_load)
9653         (remote_pid_to_exec_file, remote_can_do_single_step)
9654         (remote_execution_direction, remote_thread_handle_to_thread_info):
9655         Refactor as methods of remote_target.
9656         (init_remote_ops, init_extended_remote_ops): Delete.
9657         (remote_can_async_p, remote_is_async_p, remote_async)
9658         (remote_thread_events, remote_upload_tracepoints)
9659         (remote_upload_trace_state_variables): Refactor as methods of
9660         remote_target.
9661         (_initialize_remote): Remove references to init_remote_ops and
9662         init_extended_remote_ops.
9663
9664         * remote-sim.c (gdbsim_target): New class.
9665         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9666         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9667         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9668         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9669         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9670         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9671         Refactor as methods of gdbsim_target.
9672         (gdbsim_ops): Now a gdbsim_target.
9673         (init_gdbsim_ops): Delete.
9674         (gdbsim_cntrl_c): Adjust.
9675         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9676
9677         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9678         (the_amd64_linux_nat_target): New.
9679         (amd64_linux_fetch_inferior_registers)
9680         (amd64_linux_store_inferior_registers): Refactor as methods of
9681         amd64_linux_nat_target.
9682         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9683         * i386-linux-nat.c: Don't include "linux-nat.h".
9684         (i386_linux_nat_target): New class.
9685         (the_i386_linux_nat_target): New.
9686         (i386_linux_fetch_inferior_registers)
9687         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9688         as methods of i386_linux_nat_target.
9689         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9690         * inf-child.c (inf_child_ops): Delete.
9691         (inf_child_fetch_inferior_registers)
9692         (inf_child_store_inferior_registers): Delete.
9693         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9694         methods of inf_child_target.
9695         (inf_child_target::supports_terminal_ours)
9696         (inf_child_target::terminal_init)
9697         (inf_child_target::terminal_inferior)
9698         (inf_child_target::terminal_ours_for_output)
9699         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9700         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9701         New.
9702         (inf_child_open, inf_child_disconnect, inf_child_close)
9703         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9704         (inf_child_post_startup_inferior, inf_child_can_run)
9705         (inf_child_pid_to_exec_file): Refactor as methods of
9706         inf_child_target.
9707         (inf_child_follow_fork): Delete.
9708         (inf_child_target::can_create_inferior)
9709         (inf_child_target::can_attach): New.
9710         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9711         (inf_child_target::has_stack, inf_child_target::has_registers)
9712         (inf_child_target::has_execution): New.
9713         (inf_child_fileio_open, inf_child_fileio_pwrite)
9714         (inf_child_fileio_pread, inf_child_fileio_fstat)
9715         (inf_child_fileio_close, inf_child_fileio_unlink)
9716         (inf_child_fileio_readlink, inf_child_use_agent)
9717         (inf_child_can_use_agent): Refactor as methods of
9718         inf_child_target.
9719         (return_zero, inf_child_target): Delete.
9720         (inf_child_target::inf_child_target): New.
9721         * inf-child.h: Include "target.h".
9722         (inf_child_target): Delete function prototype.
9723         (inf_child_target): New class.
9724         (inf_child_open_target, inf_child_mourn_inferior)
9725         (inf_child_maybe_unpush_target): Delete.
9726         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9727         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9728         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9729         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9730         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9731         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9732         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9733         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9734         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9735         methods of inf_ptrace_target.
9736         (inf_ptrace_target): Delete function.
9737         * inf-ptrace.h: Include "inf-child.h".
9738         (inf_ptrace_target): Delete function declaration.
9739         (inf_ptrace_target): New class.
9740         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9741         * linux-nat.c (linux_target): New.
9742         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9743         (linux_nat_target::~linux_nat_target): New.
9744         (linux_child_post_attach, linux_child_post_startup_inferior)
9745         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9746         (linux_child_remove_fork_catchpoint)
9747         (linux_child_insert_vfork_catchpoint)
9748         (linux_child_remove_vfork_catchpoint)
9749         (linux_child_insert_exec_catchpoint)
9750         (linux_child_remove_exec_catchpoint)
9751         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9752         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9753         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9754         (linux_nat_stopped_data_address)
9755         (linux_nat_stopped_by_sw_breakpoint)
9756         (linux_nat_supports_stopped_by_sw_breakpoint)
9757         (linux_nat_stopped_by_hw_breakpoint)
9758         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9759         (linux_nat_kill, linux_nat_mourn_inferior)
9760         (linux_nat_xfer_partial, linux_nat_thread_alive)
9761         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9762         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9763         (linux_child_static_tracepoint_markers_by_strid)
9764         (linux_nat_is_async_p, linux_nat_can_async_p)
9765         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9766         (linux_nat_supports_multi_process)
9767         (linux_nat_supports_disable_randomization, linux_nat_async)
9768         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9769         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9770         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9771         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9772         methods of linux_nat_target.
9773         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9774         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9775         parameter.
9776         (check_stopped_by_watchpoint): Adjust.
9777         (linux_xfer_partial): Delete.
9778         (linux_target_install_ops, linux_target, linux_nat_add_target):
9779         Delete.
9780         (linux_nat_target::linux_nat_target): New.
9781         * linux-nat.h: Include "inf-ptrace.h".
9782         (linux_nat_target): New.
9783         (linux_target, linux_target_install_ops, linux_nat_add_target):
9784         Delete function declarations.
9785         (linux_target): Declare global.
9786         * linux-thread-db.c (thread_db_target): New.
9787         (thread_db_target::thread_db_target): New.
9788         (thread_db_ops): Delete.
9789         (the_thread_db_target): New.
9790         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9791         (thread_db_update_thread_list, thread_db_pid_to_str)
9792         (thread_db_extra_thread_info)
9793         (thread_db_thread_handle_to_thread_info)
9794         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9795         (thread_db_resume): Refactor as methods of thread_db_target.
9796         (init_thread_db_ops): Delete.
9797         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9798         * x86-linux-nat.c: Don't include "linux-nat.h".
9799         (super_post_startup_inferior): Delete.
9800         (x86_linux_nat_target::~x86_linux_nat_target): New.
9801         (x86_linux_child_post_startup_inferior)
9802         (x86_linux_read_description, x86_linux_enable_btrace)
9803         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9804         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9805         methods of x86_linux_nat_target.
9806         (x86_linux_create_target): Delete.  Bits folded ...
9807         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9808         pointer.
9809         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9810         (x86_linux_nat_target): New class.
9811         (x86_linux_create_target): Delete.
9812         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9813         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9814         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9815         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9816         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9817         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9818         make extern.
9819         (x86_use_watchpoints): Delete.
9820         * x86-nat.h: Include "breakpoint.h" and "target.h".
9821         (x86_use_watchpoints): Delete.
9822         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9823         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9824         (x86_insert_watchpoint, x86_remove_watchpoint)
9825         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9826         (x86_stopped_by_hw_breakpoint): New declarations.
9827         (x86_nat_target): New template class.
9828
9829         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9830         (the_ppc_linux_nat_target): New.
9831         (ppc_linux_fetch_inferior_registers)
9832         (ppc_linux_can_use_hw_breakpoint)
9833         (ppc_linux_region_ok_for_hw_watchpoint)
9834         (ppc_linux_ranged_break_num_registers)
9835         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9836         (ppc_linux_insert_mask_watchpoint)
9837         (ppc_linux_remove_mask_watchpoint)
9838         (ppc_linux_can_accel_watchpoint_condition)
9839         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9840         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9841         (ppc_linux_watchpoint_addr_within_range)
9842         (ppc_linux_masked_watch_num_registers)
9843         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9844         (ppc_linux_read_description): Refactor as methods of
9845         ppc_linux_nat_target.
9846         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9847
9848         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9849         (procfs_target): New class.
9850         (the_procfs_target): New.
9851         (procfs_target): Delete function.
9852         (procfs_auxv_parse, procfs_attach, procfs_detach)
9853         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9854         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9855         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9856         (procfs_create_inferior, procfs_update_thread_list)
9857         (procfs_thread_alive, procfs_pid_to_str)
9858         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9859         (procfs_stopped_data_address, procfs_insert_watchpoint)
9860         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9861         (proc_find_memory_regions, procfs_info_proc)
9862         (procfs_make_note_section): Refactor as methods of procfs_target.
9863         (_initialize_procfs): Adjust.
9864         * sol-thread.c (sol_thread_target): New class.
9865         (sol_thread_ops): Now a sol_thread_target.
9866         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9867         (sol_thread_fetch_registers, sol_thread_store_registers)
9868         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9869         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9870         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9871         (init_sol_thread_ops): Delete.
9872         (_initialize_sol_thread): Adjust.  Remove references to
9873         init_sol_thread_ops and complete_target_initialization.
9874
9875         * windows-nat.c (windows_nat_target): New class.
9876         (windows_fetch_inferior_registers)
9877         (windows_store_inferior_registers, windows_resume, windows_wait)
9878         (windows_attach, windows_detach, windows_pid_to_exec_file)
9879         (windows_files_info, windows_create_inferior)
9880         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9881         (windows_close, windows_pid_to_str, windows_xfer_partial)
9882         (windows_get_tib_address, windows_get_ada_task_ptid)
9883         (windows_thread_name, windows_thread_alive): Refactor as
9884         windows_nat_target methods.
9885         (do_initial_windows_stuff): Adjust.
9886         (windows_target): Delete function.
9887         (_initialize_windows_nat): Adjust.
9888
9889         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9890         (darwin_mourn_inferior, darwin_kill_inferior)
9891         (darwin_create_inferior, darwin_attach, darwin_detach)
9892         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9893         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9894         (darwin_supports_multi_process): Refactor as darwin_nat_target
9895         methods.
9896         (darwin_resume_to, darwin_files_info): Delete.
9897         (_initialize_darwin_inferior): Rename to ...
9898         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9899         * darwin-nat.h: Include "inf-child.h".
9900         (darwin_nat_target): New class.
9901         (darwin_complete_target): Delete.
9902         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9903         (darwin_target): New.
9904         (i386_darwin_fetch_inferior_registers)
9905         (i386_darwin_store_inferior_registers): Refactor as methods of
9906         darwin_nat_target.
9907         (darwin_complete_target): Delete, with ...
9908         (_initialize_i386_darwin_nat): ... bits factored out here.
9909
9910         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9911         (the_alpha_linux_nat_target): New.
9912         (alpha_linux_register_u_offset): Refactor as
9913         alpha_linux_nat_target method.
9914         (_initialize_alpha_linux_nat): Adjust.
9915         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9916         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9917         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9918         methods of linux_nat_trad_target.
9919         (linux_trad_target): Delete.
9920         * linux-nat-trad.h (linux_trad_target): Delete function.
9921         (linux_nat_trad_target): New class.
9922         * mips-linux-nat.c (mips_linux_nat_target): New class.
9923         (super_fetch_registers, super_store_registers, super_close):
9924         Delete.
9925         (the_mips_linux_nat_target): New.
9926         (mips64_linux_regsets_fetch_registers)
9927         (mips64_linux_regsets_store_registers)
9928         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9929         (mips_linux_register_u_offset, mips_linux_read_description)
9930         (mips_linux_can_use_hw_breakpoint)
9931         (mips_linux_stopped_by_watchpoint)
9932         (mips_linux_stopped_data_address)
9933         (mips_linux_region_ok_for_hw_watchpoint)
9934         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9935         (mips_linux_close): Refactor as methods of mips_linux_nat.
9936         (_initialize_mips_linux_nat): Adjust to C++ification.
9937
9938         * aix-thread.c (aix_thread_target): New class.
9939         (aix_thread_ops): Now an aix_thread_target.
9940         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9941         (aix_thread_fetch_registers, aix_thread_store_registers)
9942         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9943         (aix_thread_thread_alive, aix_thread_pid_to_str)
9944         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9945         Refactor as methods of aix_thread_target.
9946         (init_aix_thread_ops): Delete.
9947         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9948         and complete_target_initialization.
9949         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9950         (rs6000_nat_target): New class.
9951         (the_rs6000_nat_target): New.
9952         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9953         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9954         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9955         (super_create_inferior): Delete.
9956         (_initialize_rs6000_nat): Adjust to C++ification.
9957
9958         * arm-linux-nat.c (arm_linux_nat_target): New class.
9959         (the_arm_linux_nat_target): New.
9960         (arm_linux_fetch_inferior_registers)
9961         (arm_linux_store_inferior_registers, arm_linux_read_description)
9962         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9963         (arm_linux_remove_hw_breakpoint)
9964         (arm_linux_region_ok_for_hw_watchpoint)
9965         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9966         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9967         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9968         arm_linux_nat_target.
9969         (_initialize_arm_linux_nat): Adjust to C++ification.
9970
9971         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9972         (the_aarch64_linux_nat_target): New.
9973         (aarch64_linux_fetch_inferior_registers)
9974         (aarch64_linux_store_inferior_registers)
9975         (aarch64_linux_child_post_startup_inferior)
9976         (aarch64_linux_read_description)
9977         (aarch64_linux_can_use_hw_breakpoint)
9978         (aarch64_linux_insert_hw_breakpoint)
9979         (aarch64_linux_remove_hw_breakpoint)
9980         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9981         (aarch64_linux_region_ok_for_hw_watchpoint)
9982         (aarch64_linux_stopped_data_address)
9983         (aarch64_linux_stopped_by_watchpoint)
9984         (aarch64_linux_watchpoint_addr_within_range)
9985         (aarch64_linux_can_do_single_step): Refactor as methods of
9986         aarch64_linux_nat_target.
9987         (super_post_startup_inferior): Delete.
9988         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9989
9990         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9991         (the_hppa_linux_nat_target): New.
9992         (hppa_linux_fetch_inferior_registers)
9993         (hppa_linux_store_inferior_registers): Refactor as methods of
9994         hppa_linux_nat_target.
9995         (_initialize_hppa_linux_nat): Adjust to C++ification.
9996
9997         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9998         (the_ia64_linux_nat_target): New.
9999         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10000         (ia64_linux_stopped_data_address)
10001         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10002         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10003         ia64_linux_nat_target methods.
10004         (super_xfer_partial): Delete.
10005         (_initialize_ia64_linux_nat): Adjust to C++ification.
10006
10007         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10008         (the_m32r_linux_nat_target): New.
10009         (m32r_linux_fetch_inferior_registers)
10010         (m32r_linux_store_inferior_registers): Refactor as
10011         m32r_linux_nat_target methods.
10012         (_initialize_m32r_linux_nat): Adjust to C++ification.
10013
10014         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10015         (the_m68k_linux_nat_target): New.
10016         (m68k_linux_fetch_inferior_registers)
10017         (m68k_linux_store_inferior_registers): Refactor as
10018         m68k_linux_nat_target methods.
10019         (_initialize_m68k_linux_nat): Adjust to C++ification.
10020
10021         * s390-linux-nat.c (s390_linux_nat_target): New class.
10022         (the_s390_linux_nat_target): New.
10023         (s390_linux_fetch_inferior_registers)
10024         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10025         (s390_insert_watchpoint, s390_remove_watchpoint)
10026         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10027         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10028         (s390_auxv_parse, s390_read_description): Refactor as methods of
10029         s390_linux_nat_target.
10030         (_initialize_s390_nat): Adjust to C++ification.
10031
10032         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10033         (the_sparc_linux_nat_target): New.
10034         (_initialize_sparc_linux_nat): Adjust to C++ification.
10035         * sparc-nat.c (sparc_fetch_inferior_registers)
10036         (sparc_store_inferior_registers): Remove target_ops parameter.
10037         * sparc-nat.h (sparc_fetch_inferior_registers)
10038         (sparc_store_inferior_registers): Remove target_ops parameter.
10039         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10040         (the_sparc64_linux_nat_target): New.
10041         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10042
10043         * spu-linux-nat.c (spu_linux_nat_target): New class.
10044         (the_spu_linux_nat_target): New.
10045         (spu_child_post_startup_inferior, spu_child_post_attach)
10046         (spu_child_wait, spu_fetch_inferior_registers)
10047         (spu_store_inferior_registers, spu_xfer_partial)
10048         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10049         methods.
10050         (_initialize_spu_nat): Adjust to C++ification.
10051
10052         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10053         (the_tilegx_linux_nat_target): New.
10054         (fetch_inferior_registers, store_inferior_registers):
10055         Refactor as methods.
10056         (_initialize_tile_linux_nat): Adjust to C++ification.
10057
10058         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10059         (the_xtensa_linux_nat_target): New.
10060         (xtensa_linux_fetch_inferior_registers)
10061         (xtensa_linux_store_inferior_registers): Refactor as
10062         xtensa_linux_nat_target methods.
10063         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10064
10065         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10066         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10067         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10068         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10069         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10070         (fbsd_stopped_by_sw_breakpoint)
10071         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10072         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10073         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10074         (fbsd_post_startup_inferior, fbsd_post_attach)
10075         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10076         (fbsd_set_syscall_catchpoint)
10077         (super_xfer_partial, super_resume, super_wait)
10078         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10079         (fbsd_handle_debug_trap): Remove target_ops parameter.
10080         (fbsd_nat_add_target): Delete.
10081         * fbsd-nat.h: Include "inf-ptrace.h".
10082         (fbsd_nat_add_target): Delete.
10083         (USE_SIGTRAP_SIGINFO): Define.
10084         (fbsd_nat_target): New class.
10085
10086         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10087         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10088         (amd64bsd_target): Delete.
10089         * amd64-bsd-nat.h: New file.
10090         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10091         "x86-bsd-nat.h".
10092         (amd64_fbsd_nat_target): New class.
10093         (the_amd64_fbsd_nat_target): New.
10094         (amd64fbsd_read_description): Refactor as method of
10095         amd64_fbsd_nat_target.
10096         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10097         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10098         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10099         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10100         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10101         (i386bsd_target): Delete.
10102         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10103         (i386bsd_fetch_inferior_registers)
10104         (i386bsd_store_inferior_registers): Declare.
10105         (i386_bsd_nat_target): New class.
10106         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10107         (the_i386_fbsd_nat_target): New.
10108         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10109         i386_fbsd_nat_target methods.
10110         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10111         (_initialize_i386fbsd_nat): Adjust to C++ification.
10112         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10113         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10114         (_initialize_x86_bsd_nat): Adjust to C++ification.
10115         * x86-bsd-nat.h: Include "x86-nat.h".
10116         (x86bsd_target): Delete declaration.
10117         (x86bsd_nat_target): New class.
10118
10119         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10120         (the_aarch64_fbsd_nat_target): New.
10121         (aarch64_fbsd_fetch_inferior_registers)
10122         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10123         aarch64_fbsd_nat_target.
10124         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10125         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10126         (the_alpha_bsd_nat_target): New.
10127         (alphabsd_fetch_inferior_registers)
10128         (alphabsd_store_inferior_registers): Refactor as
10129         alpha_bsd_nat_target methods.
10130         (_initialize_alphabsd_nat): Refactor as methods of
10131         alpha_bsd_nat_target.
10132         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10133         (the_amd64_nbsd_nat_target): New.
10134         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10135         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10136         (the_amd64_obsd_nat_target): New.
10137         (_initialize_amd64obsd_nat): Adjust to C++ification.
10138         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10139         (the_arm_fbsd_nat_target): New.
10140         (arm_fbsd_fetch_inferior_registers)
10141         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10142         (_initialize_arm_fbsd_nat): Refactor as methods of
10143         arm_fbsd_nat_target.
10144         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10145         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10146         (the_arm_netbsd_nat_target): New.
10147         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10148         arm_netbsd_nat_target.
10149         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10150         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10151         (the_hppa_nbsd_nat_target): New.
10152         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10153         hppa_nbsd_nat_target methods.
10154         (_initialize_hppanbsd_nat): Adjust to C++ification.
10155         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10156         (the_hppa_obsd_nat_target): New.
10157         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10158         methods of hppa_obsd_nat_target.
10159         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10160         add_target.
10161         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10162         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10163         add_target.
10164         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10165         (_initialize_i386obsd_nat): Use add_target.
10166         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10167         (the_m68k_bsd_nat_target): New.
10168         (m68kbsd_fetch_inferior_registers)
10169         (m68kbsd_store_inferior_registers): Refactor as methods of
10170         m68k_bsd_nat_target.
10171         (_initialize_m68kbsd_nat): Adjust to C++ification.
10172         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10173         (the_mips_fbsd_nat_target): New.
10174         (mips_fbsd_fetch_inferior_registers)
10175         (mips_fbsd_store_inferior_registers): Refactor as methods of
10176         mips_fbsd_nat_target.
10177         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10178         add_target.
10179         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10180         (the_mips_nbsd_nat_target): New.
10181         (mipsnbsd_fetch_inferior_registers)
10182         (mipsnbsd_store_inferior_registers): Refactor as methods of
10183         mips_nbsd_nat_target.
10184         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10185         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10186         (the_mips64_obsd_nat_target): New.
10187         (mips64obsd_fetch_inferior_registers)
10188         (mips64obsd_store_inferior_registers): Refactor as methods of
10189         mips64_obsd_nat_target.
10190         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10191         add_target.
10192         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10193         nbsd_nat_target.
10194         * nbsd-nat.h: Include "inf-ptrace.h".
10195         (nbsd_nat_target): New class.
10196         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10197         (obsd_wait): Refactor as methods of obsd_nat_target.
10198         (obsd_add_target): Delete.
10199         * obsd-nat.h: Include "inf-ptrace.h".
10200         (obsd_nat_target): New class.
10201         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10202         (the_ppc_fbsd_nat_target): New.
10203         (ppcfbsd_fetch_inferior_registers)
10204         (ppcfbsd_store_inferior_registers): Refactor as methods of
10205         ppc_fbsd_nat_target.
10206         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10207         add_target.
10208         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10209         (the_ppc_nbsd_nat_target): New.
10210         (ppcnbsd_fetch_inferior_registers)
10211         (ppcnbsd_store_inferior_registers): Refactor as methods of
10212         ppc_nbsd_nat_target.
10213         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10214         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10215         (the_ppc_obsd_nat_target): New.
10216         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10217         methods of ppc_obsd_nat_target.
10218         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10219         add_target.
10220         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10221         (the_sh_nbsd_nat_target): New.
10222         (shnbsd_fetch_inferior_registers)
10223         (shnbsd_store_inferior_registers): Refactor as methods of
10224         sh_nbsd_nat_target.
10225         (_initialize_shnbsd_nat): Adjust to C++ification.
10226         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10227         (inf_ptrace_xfer_partial): Delete.
10228         (sparc_xfer_partial, sparc_target): Delete.
10229         * sparc-nat.h (sparc_fetch_inferior_registers)
10230         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10231         (sparc_target): Delete function declaration.
10232         (sparc_target): New template class.
10233         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10234         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10235         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10236         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10237         add_target.
10238         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10239         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10240         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10241         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10242         add_target.
10243         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10244         (the_vax_bsd_nat_target): New.
10245         (vaxbsd_fetch_inferior_registers)
10246         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10247         methods.
10248         (_initialize_vaxbsd_nat): Adjust to C++ification.
10249
10250         * bsd-kvm.c (bsd_kvm_target): New class.
10251         (bsd_kvm_ops): Now a bsd_kvm_target.
10252         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10253         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10254         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10255         bsd_kvm_target.
10256         (bsd_kvm_return_one): Delete.
10257         (bsd_kvm_add_target): Adjust to C++ification.
10258
10259         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10260         (nto_procfs_target_procfs): New classes.
10261         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10262         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10263         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10264         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10265         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10266         (procfs_remove_hw_breakpoint, procfs_resume)
10267         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10268         (procfs_kill_inferior, procfs_store_registers)
10269         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10270         as methods of nto_procfs_target.
10271         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10272         (nto_native_ops): Delete.
10273         (procfs_open, procfs_native_open): Delete.
10274         (nto_native_ops): Now an nto_procfs_target_native.
10275         (init_procfs_targets): Adjust to C++ification.
10276         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10277         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10278         Refactor as methods of nto_procfs_target.
10279
10280         * go32-nat.c (go32_nat_target): New class.
10281         (the_go32_nat_target): New.
10282         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10283         (go32_store_registers, go32_xfer_partial, go32_files_info)
10284         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10285         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10286         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10287         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10288         (go32_target): Delete.
10289         (_initialize_go32_nat): Adjust to C++ification.
10290
10291         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10292         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10293         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10294         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10295         gnu_nat_target.
10296         (gnu_target): Delete.
10297         * gnu-nat.h (gnu_target): Delete.
10298         (gnu_nat_target): New class.
10299         * i386-gnu-nat.c (gnu_base_target): New.
10300         (i386_gnu_nat_target): New class.
10301         (the_i386_gnu_nat_target): New.
10302         (_initialize_i386gnu_nat): Adjust to C++ification.
10303
10304 2018-05-02  Pedro Alves  <palves@redhat.com>
10305
10306         * bfd-target.c (target_bfd_xclose): Rename to ...
10307         (target_bfd_close): ... this.
10308         (target_bfd_reopen): Adjust.
10309         * target.c (target_close): Remove references to to_xclose.
10310         * target.h (target_ops::to_xclose): Delete.
10311         (target_ops::to_close): Update comments.
10312
10313 2018-05-02  Pedro Alves  <palves@redhat.com>
10314
10315         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10316         "linux-nat.h".
10317         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10318         * inf-ptrace.c (inf_ptrace_register_u_offset)
10319         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10320         (inf_ptrace_store_register, inf_ptrace_store_registers)
10321         (inf_ptrace_trad_target): Move to ...
10322         * linux-nat-trad.c: ... this new file.
10323         * linux-nat-trad.h: New file.
10324         * linux-nat.c (linux_target_install_ops): Make extern.
10325         (linux_trad_target): Delete.
10326         * linux-nat.h (linux_trad_target): Delete declaration.
10327         (linux_target_install_ops): Declare.
10328         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10329         "linux-nat.h".
10330
10331 2018-05-02  Pedro Alves  <palves@redhat.com>
10332
10333         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10334         procfs_target/add_target here.
10335         * procfs.c (procfs_target): Make static.
10336         (_initialize_procfs): Call add_target here.
10337         * procfs.h (struct target_ops): Remove forward declaration.
10338         (procfs_target): Remove declaration.
10339         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10340
10341 2018-05-02  Pedro Alves  <palves@redhat.com>
10342
10343         * procfs.c (procfs_stopped_by_watchpoint)
10344         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10345         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10346         Forward declare.
10347         (procfs_use_watchpoints): Delete, move contents...
10348         (procfs_target): ... here.
10349         * procfs.h (procfs_use_watchpoints): Delete declaration.
10350         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10351         procfs_use_watchpoints.
10352         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10353         procfs_use_watchpoints.
10354
10355 2018-05-02  Tom Tromey  <tom@tromey.com>
10356
10357         PR python/20084:
10358         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10359         and var_zuinteger_unlimited.
10360         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10361         and PARAM_ZUINTEGER_UNLIMITED.
10362         (set_parameter_value): Handle var_zuinteger and
10363         var_zuinteger_unlimited.
10364         (add_setshow_generic): Likewise.
10365         (parmpy_init): Likewise.
10366
10367 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10368
10369         PR rust/23124
10370         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10371         pointer is not null before dereferencing it.
10372
10373 2018-04-30  Tom Tromey  <tom@tromey.com>
10374
10375         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10376         is_mi_like_p.
10377
10378 2018-04-30  Tom Tromey  <tom@tromey.com>
10379
10380         * breakpoint.c (mention): Remove use of is_mi_like_p.
10381         (print_mention_ranged_breakpoint): Likewise.
10382         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10383         of is_mi_like_p.
10384
10385 2018-04-30  Tom Tromey  <tom@tromey.com>
10386
10387         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10388
10389 2018-04-30  Tom Tromey  <tom@tromey.com>
10390
10391         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10392         (info_spu_event_command): Remove some uses of is_mi_like_p.
10393
10394 2018-04-30  Tom Tromey  <tom@tromey.com>
10395
10396         * python/py-framefilter.c (py_print_single_arg)
10397         (enumerate_locals, py_print_args, py_print_frame): Remove some
10398         uses of is_mi_like_p.
10399
10400 2018-04-30  Tom Tromey  <tom@tromey.com>
10401
10402         * ui-out.c: Update.
10403         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10404         * ui-out.h (ui_out::is_mi_like_p): Now const.
10405         (ui_out::do_is_mi_like_p): Now const.
10406         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10407
10408 2018-04-30  Tom Tromey  <tom@tromey.com>
10409
10410         * varobj.c (varobj_set_visualizer): Use new_reference.
10411         * python/python.c (gdbpy_decode_line): Use new_reference.
10412         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10413         new_reference.
10414
10415 2018-04-30  Tom Tromey  <tom@tromey.com>
10416
10417         * varobj.c (install_new_value): Use new_reference.
10418         * value.h (value_incref): Return void.  Swap intro comment with
10419         value_decref.
10420         * value.c (set_value_parent): Use new_reference.
10421         (value_incref): Return void.  Update intro comment.
10422         (release_value): Use new_reference.
10423         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10424
10425 2018-04-30  Tom Tromey  <tom@tromey.com>
10426
10427         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10428         * gdb_bfd.h (new_bfd_ref): Remove.
10429         (gdb_bfd_open): Update comment.
10430         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10431         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10432         (gdb_bfd_fdopenr): Use new_reference.
10433         * exec.c (exec_file_attach): Use new_reference.
10434
10435 2018-04-30  Tom Tromey  <tom@tromey.com>
10436
10437         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10438         method.
10439
10440 2018-04-30  Tom Tromey  <tom@tromey.com>
10441
10442         * jit.c (jit_read_code_entry): Use type_align.
10443         * i386-tdep.c (i386_gdbarch_init): Don't call
10444         set_gdbarch_long_long_align_bit.
10445         * gdbarch.sh: Remove long_long_align_bit.
10446         * gdbarch.c, gdbarch.h: Rebuild.
10447         * arc-tdep.c (arc_type_align): New function.
10448         (arc_gdbarch_init): Use arc_type_align.  Don't call
10449         set_gdbarch_long_long_align_bit.
10450
10451 2018-04-30  Tom Tromey  <tom@tromey.com>
10452
10453         * rust-lang.c (rust_type_alignment): Remove.
10454         (rust_composite_type): Use type_align.
10455
10456 2018-04-30  Tom Tromey  <tom@tromey.com>
10457
10458         * NEWS: Mention Type.align.
10459         * python/py-type.c (typy_get_alignof): New function.
10460         (type_object_getset): Add "alignof".
10461
10462 2018-04-30  Tom Tromey  <tom@tromey.com>
10463
10464         PR exp/17095:
10465         * NEWS: Update.
10466         * std-operator.def (UNOP_ALIGNOF): New operator.
10467         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10468         New.
10469         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10470         * c-lang.c (c_op_print_tab): Add alignof.
10471         * c-exp.y (ALIGNOF): New token.
10472         (exp): Add "ALIGNOF" production.
10473         (ident_tokens): Add _Alignof and alignof.
10474
10475 2018-04-30  Tom Tromey  <tom@tromey.com>
10476
10477         * i386-tdep.c (i386_type_align): New function.
10478         (i386_gdbarch_init): Update.
10479         * gdbarch.sh (type_align): New method.
10480         * gdbarch.c, gdbarch.h: Rebuild.
10481         * arch-utils.h (default_type_align): Declare.
10482         * arch-utils.c (default_type_align): New function.
10483         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10484         (struct type) <align_log2>: New field.
10485         <instance_flags>: Now a bitfield.
10486         (TYPE_RAW_ALIGN): New macro.
10487         (type_align, type_raw_align, set_type_align): Declare.
10488         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10489         functions.
10490         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10491         (get_alignment, maybe_set_alignment): New functions.
10492         (read_structure_type, read_enumeration_type, read_array_type)
10493         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10494         (read_subrange_type, read_base_type): Set type alignment.
10495
10496 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10497
10498         * dwarf2read.c (read_index_from_section): Use bool.
10499
10500 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10501
10502         PR gdb/22950
10503         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10504         with #ifdef.
10505
10506 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10507
10508         PR build/22873
10509         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10510         last step, and do it atomically.
10511
10512 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10513
10514         * compile/compile-c-types.c (convert_int, convert_float):
10515         Update for C FE v1.
10516
10517 2018-04-27  Tom Tromey  <tom@tromey.com>
10518
10519         PR rust/22545:
10520         * rust-lang.c (rust_inclusive_range_type_p): New function.
10521         (rust_range): Handle inclusive ranges.
10522         (rust_compute_range): Likewise.
10523         * rust-exp.y (struct rust_op) <inclusive>: New field.
10524         (DOTDOTEQ): New constant.
10525         (range_expr): Add "..=" productions.
10526         (operator_tokens): Add "..=" token.
10527         (ast_range): Add "inclusive" parameter.
10528         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10529         ranges.
10530         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10531         bounds values.
10532         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10533         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10534         Update comments.
10535         * expprint.c (print_subexp_standard): Handle new bounds values.
10536         (dump_subexp_body_standard): Likewise.
10537
10538 2018-04-27  Tom Tromey  <tom@tromey.com>
10539
10540         * configure: Rebuild.
10541         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10542         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10543         "OVERRIDE".
10544         (class symbol_needs_eval_context): Likewise.
10545         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10546         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10547         "virtual".
10548         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10549         "override".
10550         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10551         * aarch64-tdep.c (instruction_reader::read): Use "override".
10552         (instruction_reader_test::read): Likewise.
10553         * arm-tdep.c (instruction_reader::read): Use "override".
10554         (instruction_reader_thumb::read): Likewise.
10555
10556 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10557
10558         PR remote/9665
10559         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10560         instead of remote_send.
10561         (remote_send): Remove.
10562
10563 2018-04-26  Pedro Alves  <palves@redhat.com>
10564
10565         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10566         find_function_start_sal instead of find_pc_line.
10567
10568 2018-04-26  Pedro Alves  <palves@redhat.com>
10569
10570         * breakpoint.c (set_breakpoint_location_function): Handle
10571         mst_data_gnu_ifunc.
10572         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10573         * elfread.c (elf_symtab_read): Give data symbols with
10574         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10575         (elf_rel_plt_read): Update comment.
10576         * linespec.c (convert_linespec_to_sals): Handle
10577         mst_data_gnu_ifunc.
10578         (minsym_found): Handle mst_data_gnu_ifunc.
10579         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10580         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10581         * parse.c (find_minsym_type_and_address): Handle
10582         mst_data_gnu_ifunc.
10583         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10584         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10585         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10586         comment.
10587         <mst_data_gnu_ifunc>: New enumerator.
10588
10589 2018-04-26  Pedro Alves  <palves@redhat.com>
10590
10591         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10592         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10593         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10594         Handle it.
10595         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10596         (lookup_minimal_symbol_by_pc): Adjust.
10597         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10598         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10599         * minsyms.h (lookup_msym_prefer): New enum.
10600         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10601         parameter by a lookup_msym_prefer parameter.
10602
10603 2018-04-26  Pedro Alves  <palves@redhat.com>
10604
10605         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10606         ends in "@plt" instead of looking at the symbol's section.
10607
10608 2018-04-26  Pedro Alves  <palves@redhat.com>
10609
10610         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10611         all references.
10612         (find_pc_partial_function_gnu_ifunc): Rename to ...
10613         (find_pc_partial_function): ... this, and remove references to
10614         'is_gnu_ifunc_p'.
10615         (find_pc_partial_function): Delete old implementation.
10616         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10617
10618 2018-04-26  Pedro Alves  <palves@redhat.com>
10619
10620         * linespec.c (struct bound_minimal_symbol_search_key): New.
10621         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10622         skip first line if we found a GNU ifunc minimal symbol by name.
10623         (compare_msymbols): Change parameters to work with a destructured
10624         lhs minsym.
10625         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10626         functions.
10627
10628 2018-04-26  Pedro Alves  <palves@redhat.com>
10629
10630         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10631         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10632         address/name.
10633         (add_location_to_breakpoint): Store the minsym and the objfile in
10634         the breakpoint location.
10635         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10636         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10637         Record the minsym in the sal.
10638         * symtab.h (symtab_and_line) <msymbol>: New field.
10639
10640 2018-04-26  Pedro Alves  <palves@redhat.com>
10641
10642         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10643         unless we actually resolved the ifunc.
10644
10645 2018-04-26  Pedro Alves  <palves@redhat.com>
10646
10647         * c-exp.y (variable production): Prefer ifunc minsyms over
10648         regular function symbols.
10649         * symtab.c (find_gnu_ifunc): New function.
10650         * minsyms.h (lookup_msym_prefer): New enum.
10651         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10652         parameter by a lookup_msym_prefer parameter.
10653         * symtab.h (find_gnu_ifunc): New declaration.
10654
10655 2018-04-26  Pedro Alves  <palves@redhat.com>
10656
10657         * blockframe.c (find_gnu_ifunc_target_type): New function.
10658         (find_function_type): New.
10659         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10660         return a value with a memory address.
10661         (eval_call): For calls to GNU ifunc functions, try to find the
10662         type of the target function from the type that the resolver
10663         returns.
10664         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10665         symbols.
10666         * infcall.c (find_function_return_type): Delete.
10667         (find_function_addr): Add 'function_type' parameter.  For calls to
10668         GNU ifunc functions, try to find the type of the target function
10669         from the type that the resolver returns, and return it via
10670         FUNCTION_TYPE.
10671         (call_function_by_hand_dummy): Adjust to use the function type
10672         returned by find_function_addr.
10673         (find_function_addr): Add 'function_type' parameter and move
10674         description here.
10675         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10676         declarations.
10677
10678 2018-04-26  Pedro Alves  <palves@redhat.com>
10679
10680         * c-exp.y (variable production): Skip finding an alias for ifunc
10681         symbols.
10682
10683 2018-04-26  Pedro Alves  <palves@redhat.com>
10684
10685         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10686
10687 2018-04-25  Pedro Alves  <palves@redhat.com>
10688
10689         * infcmd.c (kill_command): Print the pid as string, not the whole
10690         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10691         message.
10692         * remote.c (remote_detach_1): Print the pid as string, not the
10693         whole thread's ptid.
10694
10695 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10696             Sergio Durigan Junior  <sergiodj@redhat.com>
10697             Pedro Alves  <palves@redhat.com>
10698
10699         * infcmd.c (kill_command): Print message when inferior has
10700         been killed.
10701         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10702         '1'.
10703         (add_inferior): Improve message printed when
10704         'print_inferior_events' is on.
10705         (exit_inferior): Remove message printed when
10706         'print_inferior_events' is on.
10707         (detach_inferior): Improve message printed when
10708         'print_inferior_events' is on.
10709         (initialize_inferiors): Use 'add_inferior_silent' to set
10710         'current_inferior_'.
10711         * inferior.h (print_inferior_events): Declare here as
10712         'extern'.
10713         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10714         '[Detaching...]' messages when 'print_inferior_events' is on.
10715         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10716         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10717         'Detaching after fork from child...', replace it by '... from
10718         parent...'.
10719         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10720         prefix/suffix when printing 'Detaching...' messages.  Print
10721         them when 'print_inferior_events' is on.
10722         * remote.c (remote_detach_1): Print message when detaching
10723         from inferior and '!is_fork_parent'.
10724
10725 2018-04-24  Tom Tromey  <tom@tromey.com>
10726
10727         * cli-out.h: Reindent.
10728
10729 2018-04-24  Tom Tromey  <tom@tromey.com>
10730
10731         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10732         (cli_ui_out::do_field_string): Use fputs_filtered.
10733         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10734
10735 2018-04-23  Tom Tromey  <tom@tromey.com>
10736
10737         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10738         gdb::unique_xmalloc_ptr.
10739
10740 2018-04-23  Tom Tromey  <tom@tromey.com>
10741
10742         * configure: Rebuild.
10743
10744 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10745
10746         PR gdb/23095
10747         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10748         prepare_for_testing.  Set normal_bp to r_debug_state if target
10749         is bsd.
10750
10751 2018-04-21  Pedro Alves  <palves@redhat.com>
10752             Rajendra SY  <rajendra.sy@gmail.com>
10753
10754         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10755         * remote.c (extended_remote_attach): In all-stop mode, mark the
10756         thread as executing.
10757
10758 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10759
10760         * thread.c (thread_apply_all_command): Fix comment.
10761         (thread_command): Fix comment.
10762
10763 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10764
10765         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10766         parameter.
10767         * features/aarch64-core.c (create_feature_aarch64_core):
10768         Regenerate.
10769         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10770         Likewise.
10771         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10772         Likewise.
10773         * features/i386/32bit-avx512.c
10774         (create_feature_i386_32bit_avx512): Likewise.
10775         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10776         Likewise.
10777         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10778         Likewise.
10779         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10780         Likewise.
10781         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10782         Likewise.
10783         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10784         Likewise.
10785         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10786         Likewise.
10787         * features/i386/64bit-avx512.c
10788         (create_feature_i386_64bit_avx512): Likewise.
10789         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10790         Likewise.
10791         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10792         Likewise.
10793         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10794         Likewise.
10795         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10796         Likewise.
10797         * features/i386/64bit-segments.c
10798         (create_feature_i386_64bit_segments): Likewise.
10799         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10800         Likewise.
10801         * features/i386/x32-core.c
10802         (create_feature_i386_x32_core): Likewise.
10803         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10804         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10805         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10806         * target-descriptions.c: In generated code, don't pass xml
10807         filename.
10808
10809 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10810
10811         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10812         (print_xml_feature::visit_post): Likewise.
10813         (print_xml_feature::visit): Likewise.
10814         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10815         (print_xml_feature): Add new class.
10816         * regformats/regdat.sh: Null xmltarget on feature targets.
10817         * target-descriptions.c (struct target_desc): Add xmltarget.
10818         (maintenance_check_tdesc_xml_convert): Add unittest function.
10819         (tdesc_get_features_xml): Add function to get xml.
10820         (maintenance_check_xml_descriptions): Test xml generation.
10821         * xml-tdesc.c (string_read_description_xml): Add function.
10822         * xml-tdesc.h (string_read_description_xml): Add declaration.
10823
10824 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10825
10826         * features/Makefile: Add feature marker to targets with new style
10827         target descriptions.
10828         * regformats/aarch64.dat: Regenerate.
10829         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10830         * regformats/i386/amd64-avx-linux.dat: Likewise.
10831         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10832         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10833         * regformats/i386/amd64-linux.dat: Likewise.
10834         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10835         * regformats/i386/amd64.dat: Likewise.
10836         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10837         * regformats/i386/i386-avx-linux.dat: Likewise.
10838         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10839         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10840         * regformats/i386/i386-linux.dat: Likewise.
10841         * regformats/i386/i386-mmx-linux.dat: Likewise.
10842         * regformats/i386/i386-mpx-linux.dat: Likewise.
10843         * regformats/i386/i386.dat: Likewise.
10844         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10845         * regformats/i386/x32-avx-linux.dat: Likewise.
10846         * regformats/i386/x32-linux.dat: Likewise.
10847         * regformats/tic6x-c62x-linux.dat: Likewise.
10848         * regformats/tic6x-c64x-linux.dat: Likewise.
10849         * regformats/tic6x-c64xp-linux.dat: Likewise.
10850         * regformats/regdat.sh: Parse feature marker.
10851
10852 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10853
10854         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10855         (tdesc_osabi_name): Likewise.
10856         * target-descriptions.c (tdesc_architecture_name): Add new
10857         function.
10858         (tdesc_osabi_name): Likewise.
10859
10860 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10861
10862         * common/tdesc.c (tdesc_predefined_type): Move to here.
10863         (tdesc_named_type): Likewise.
10864         (tdesc_create_vector): Likewise.
10865         (tdesc_create_struct): Likewise.
10866         (tdesc_set_struct_size): Likewise.
10867         (tdesc_create_union): Likewise.
10868         (tdesc_create_flags): Likewise.
10869         (tdesc_create_enum): Likewise.
10870         (tdesc_add_field): Likewise.
10871         (tdesc_add_typed_bitfield): Likewise.
10872         (tdesc_add_bitfield): Likewise.
10873         (tdesc_add_flag): Likewise.
10874         (tdesc_add_enum_value): Likewise.
10875         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10876         (struct tdesc_type_vector): Likewise.
10877         (struct tdesc_type_field): Likewise.
10878         (struct tdesc_type_with_fields): Likewise.
10879         (tdesc_create_enum): Add declaration.
10880         (tdesc_add_typed_bitfield): Likewise.
10881         (tdesc_add_enum_value): Likewise.
10882         * target-descriptions.c (tdesc_type_field): Move from here.
10883         (tdesc_type_builtin): Likewise.
10884         (tdesc_type_vector): Likewise.
10885         (tdesc_type_with_fields): Likewise.
10886         (tdesc_predefined_types): Likewise.
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         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10900         (tdesc_add_typed_bitfield): Likewise.
10901         (tdesc_add_enum_value): Likewise.
10902
10903 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10904
10905         * common/tdesc.c (tdesc_feature::accept): Move to here.
10906         (tdesc_feature::operator==): Likewise.
10907         (tdesc_create_reg): Likewise.
10908         * common/tdesc.h (tdesc_type_kind): Likewise.
10909         (struct tdesc_type): Likewise.
10910         (struct tdesc_feature): Likewise.
10911         * regformats/regdat.sh: Create a feature.
10912         * target-descriptions.c (tdesc_type_kind): Move from here.
10913         (tdesc_type): Likewise.
10914         (tdesc_type_up): Likewise.
10915         (tdesc_feature): Likewise.
10916         (tdesc_create_reg): Likewise.
10917
10918 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10919
10920         * Makefile.in: Add arch/tdesc.c
10921         * common/tdesc.c: New file.
10922         * common/tdesc.h (tdesc_element_visitor): Move to here.
10923         (tdesc_element): Likewise.
10924         (tdesc_reg): Likewise.
10925         (tdesc_reg_up): Likewise.
10926         * regformats/regdef.h (reg): Add offset to constructors.
10927         * target-descriptions.c (tdesc_element_visitor): Move from here.
10928         (tdesc_element): Likewise.
10929         (tdesc_reg): Likewise.
10930         (tdesc_reg_up): Likewise.
10931
10932 2018-04-17  Tom Tromey  <tom@tromey.com>
10933
10934         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10935         discriminant field.
10936
10937 2018-04-17  Tom Tromey  <tom@tromey.com>
10938
10939         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10940
10941 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10942
10943         * symtab.c (print_symbol_info): Skip printing filename and line
10944         number when `last' is NULL.
10945         (symtab_symbol_info): Use empty string instead of NULL for first
10946         invocation of print_symbol_info.
10947         (rbreak_command): Pass NULL to `last' parameter of
10948         print_symbol_info.
10949
10950 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10951
10952         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10953         instead of nullptr.
10954
10955 2018-04-16  Pedro Alves  <palves@redhat.com>
10956
10957         * MAINTAINERS (sh): Remove.
10958         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10959         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10960         (ALLDEPFILES): Remove sh64-tdep.c.
10961         * NEWS: Mentions that support for SH-5/SH64 is removed.
10962         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10963         (sh*-*-openbsd*): Ditto.
10964         (sh64-*-elf*): Remove.
10965         (sh*): Remove.
10966         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10967         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10968         * sh-tdep.c: No longer include "sh64-tdep.h".
10969         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10970         * sh64-tdep.c, sh64-tdep.h: Remove files.
10971
10972 2018-04-16  Pedro Alves  <palves@redhat.com>
10973
10974         * MAINTAINERS: Remove m88k.
10975         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10976         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10977         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10978         * NEWS: Mention that support for m88k was removed.
10979         * configure.host (m88*-*-*): Remove support.
10980         * configure.nat (m88k-*-*): Remove support.
10981         * configure.tgt (m88*-*-openbsd*): Remove.
10982         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10983
10984 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10985
10986         * configure.tgt (x86_tobjs): New variable.
10987         (amd64_tobjs, i386_tobjs): Use it.
10988
10989 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10990
10991         * symtab.c (print_symbol_info): Precede the symbol definition by
10992         the line number when available.
10993         * NEWS: Advertise this enhancement.
10994
10995 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10996
10997         * NEWS (New options): announce set/show record btrace cpu.
10998         * btrace.c: Include record-btrace.h.
10999         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11000         the vendor is unknown.
11001         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11002         Maybe overwrite the btrace configuration's cpu.
11003         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11004         (btrace_fetch): Add cpu parameter.  Update callers.
11005         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11006         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11007         errata workarounds if the vendor is unknown.
11008         * python/py-record-btrace.c: Include record-btrace.h.
11009         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11010         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11011         * record-btrace.c (record_btrace_cpu_state_kind): New.
11012         (record_btrace_cpu): New.
11013         (set_record_btrace_cpu_cmdlist): New.
11014         (record_btrace_get_cpu): New.
11015         (require_btrace_thread, record_btrace_info)
11016         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11017         (cmd_set_record_btrace_cpu_none): New.
11018         (cmd_set_record_btrace_cpu_auto): New.
11019         (cmd_set_record_btrace_cpu): New.
11020         (cmd_show_record_btrace_cpu): New.
11021         (_initialize_record_btrace): Initialize set/show record btrace cpu
11022         commands.
11023         * record-btrace.h (record_btrace_get_cpu): New.
11024
11025 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11026
11027         * record.c (set_record_command): Fix typo in message.
11028
11029 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11030
11031         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11032
11033 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11034
11035         * infrun.c (process_event_stop_test): Call
11036         gdbarch_in_indirect_branch_thunk.
11037         * gdbarch.sh (in_indirect_branch_thunk): New.
11038         * gdbarch.c: Regenerated.
11039         * gdbarch.h: Regenerated.
11040         * x86-tdep.h: New.
11041         * x86-tdep.c: New.
11042         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11043         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11044         (ALLDEPFILES): Add x86-tdep.c.
11045         * arch-utils.h (default_in_indirect_branch_thunk): New.
11046         * arch-utils.c (default_in_indirect_branch_thunk): New.
11047         * i386-tdep: Include x86-tdep.h.
11048         (i386_in_indirect_branch_thunk): New.
11049         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11050         function.
11051         * amd64-tdep: Include x86-tdep.h.
11052         (amd64_in_indirect_branch_thunk): New.
11053         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11054
11055 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11056
11057         PR gdb/23053
11058         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11059         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11060         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11061         regression.
11062
11063 2018-04-12  Tom Tromey  <tom@tromey.com>
11064
11065         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11066         (rust_evaluate_subexp): Likewise.
11067
11068 2018-04-12  Pedro Alves  <palves@redhat.com>
11069
11070         * procfs.c (procfs_detach): Make forward declaration's prototype
11071         match definition's protototype.
11072         (proc_get_LDT_entry): Remove stale do_cleanups call.
11073
11074 2018-04-12  Pedro Alves  <palves@redhat.com>
11075
11076         * target.h (target_ops::to_has_exited): Delete.
11077         (target_has_exited): Delete.
11078         * target-delegates.c: Regenerate.
11079
11080 2018-04-11  Pedro Alves  <palves@redhat.com>
11081
11082         * target.c (fileio_fh_t::t): Add comment.
11083         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11084         (target_fileio_close): Handle a NULL target.
11085         (invalidate_fileio_fh): New.
11086         (target_close): Call it.
11087         * remote.c (remote_hostio_send_command): No longer check whether
11088         remote_desc is open.
11089
11090 2018-04-11  Pedro Alves  <palves@redhat.com>
11091
11092         * target.c (fileio_fh_t): Make it a named struct instead of a
11093         typedef.
11094         (fileio_fh_t::is_closed): New method.
11095         (DEF_VEC_O (fileio_fh_t)): Remove.
11096         (fileio_fhandles): Now a std::vector.
11097         (is_closed_fileio_fh): Delete.
11098         (acquire_fileio_fd): Adjust.  Rename parameters.
11099         (release_fileio_fd): Adjust.
11100         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11101         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11102         (target_fileio_close): Adjust.
11103
11104 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11105
11106         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11107         index.
11108
11109 2018-04-10  Pedro Alves  <palves@redhat.com>
11110
11111         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11112         (scoped_finish_thread_state): New class.
11113         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11114         cleanup.
11115         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11116         (fetch_inferior_event, normal_stop): Likewise.
11117         * thread.c (finish_thread_state_cleanup): Delete.
11118
11119 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11120             Pedro Alves  <palves@redhat.com>
11121
11122         * value.c: Include "selftest.h" and "common/array-view.h".
11123         (struct range) <operator ==>: New.
11124         (test_ranges_contain): New.
11125         (check_ranges_vector): New.
11126         (test_insert_into_bit_range_vector): New.
11127         (_initialize_values): Register selftests.
11128         * common/array-view.h (operator==, operator!=): New.
11129
11130 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11131
11132         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11133         an iterator.
11134         * inline-frame.c: Include <algorithm>.
11135         (struct inline_state): Add constructor.
11136         (inline_state_s): Remove.
11137         (DEF_VEC_O(inline_state_s)): Remove.
11138         (inline_states): Change type to std::vector.
11139         (find_inline_frame_state): Adjust to std::vector.
11140         (allocate_inline_frame_state): Remove.
11141         (clear_inline_frame_state): Adjust to std::vector.
11142         (skip_inline_frames): Adjust to std::vector.
11143
11144 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11145
11146         * tracepoint.h (struct trace_state_variable): Add constructor.
11147         <name>: Change type to std::string.
11148         * tracepoint.c (tsv_s): Remove.
11149         (DEF_VEC_O(tsv_s)): Remove.
11150         (tvariables): Change to std::vector.
11151         (create_trace_state_variable): Adjust to std::vector.
11152         (find_trace_state_variable): Likewise.
11153         (find_trace_state_variable_by_number): Likewise.
11154         (delete_trace_state_variable): Likewise.
11155         (trace_variable_command): Adjust to std::string.
11156         (delete_trace_variable_command): Likewise.
11157         (tvariables_info_1): Adjust to std::vector.
11158         (save_trace_state_variables): Likewise.
11159         (start_tracing): Likewise.
11160         (merge_uploaded_trace_state_variables): Adjust to std::vector
11161         and std::string.
11162         * target.h (struct target_ops)
11163         <to_download_trace_state_variable>: Pass reference to
11164         trace_state_variable.
11165         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11166         * target-delegates.c: Re-generate.
11167         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11168         (mi_tsv_deleted): Likewise.
11169         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11170         * remote.c (remote_download_trace_state_variable): Change
11171         pointer to reference and adjust.
11172         * make-target-delegates (parse_argtypes): Handle references.
11173         (write_function_header): Likewise.
11174         (munge_type): Likewise.
11175
11176 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11177
11178         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11179         string_view-selftests.c.
11180         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11181         testsuite.
11182         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11183         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11184         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11185         * unittests/basic_string_view/element_access/char/1.cc:
11186         Likewise.
11187         * unittests/basic_string_view/element_access/char/empty.cc:
11188         Likewise.
11189         * unittests/basic_string_view/element_access/char/front_back.cc:
11190         Likewise.
11191         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11192         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11193         Likewise.
11194         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11195         Likewise.
11196         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11197         Likewise.
11198         * unittests/basic_string_view/operations/compare/char/1.cc:
11199         Likewise.
11200         * unittests/basic_string_view/operations/compare/char/13650.cc:
11201         Likewise.
11202         * unittests/basic_string_view/operations/copy/char/1.cc:
11203         Likewise.
11204         * unittests/basic_string_view/operations/data/char/1.cc:
11205         Likewise.
11206         * unittests/basic_string_view/operations/find/char/1.cc:
11207         Likewise.
11208         * unittests/basic_string_view/operations/find/char/2.cc:
11209         Likewise.
11210         * unittests/basic_string_view/operations/find/char/3.cc:
11211         Likewise.
11212         * unittests/basic_string_view/operations/find/char/4.cc:
11213         Likewise.
11214         * unittests/basic_string_view/operations/rfind/char/1.cc:
11215         Likewise.
11216         * unittests/basic_string_view/operations/rfind/char/2.cc:
11217         Likewise.
11218         * unittests/basic_string_view/operations/rfind/char/3.cc:
11219         Likewise.
11220         * unittests/basic_string_view/operations/substr/char/1.cc:
11221         Likewise.
11222         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11223         * unittests/string_view-selftests.c: New file.
11224
11225 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11226
11227         * unittests/basic_string_view/capacity/1.cc: New file.
11228         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11229         * unittests/basic_string_view/cons/char/1.cc: New file.
11230         * unittests/basic_string_view/cons/char/2.cc: New file.
11231         * unittests/basic_string_view/cons/char/3.cc: New file.
11232         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11233         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11234         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11235         * unittests/basic_string_view/element_access/char/1.cc: New file.
11236         * unittests/basic_string_view/element_access/char/2.cc: New file.
11237         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11238         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11239         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11240         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11241         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11242         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11243         * unittests/basic_string_view/include.cc: New file.
11244         * unittests/basic_string_view/inserters/char/1.cc: New file.
11245         * unittests/basic_string_view/inserters/char/2.cc: New file.
11246         * unittests/basic_string_view/inserters/char/3.cc: New file.
11247         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11248         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11249         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11250         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11251         * unittests/basic_string_view/literals/types.cc: New file.
11252         * unittests/basic_string_view/literals/values.cc: New file.
11253         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11254         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11255         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11256         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11257         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11258         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11259         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11260         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11261         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11262         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11263         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11264         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11265         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11266         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11267         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11268         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11269         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11270         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11271         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11272         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11273         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11274         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11275         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11276         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11277         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11278         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11279         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11280         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11281         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11282         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11283         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11284         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11285         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11286         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11287         * unittests/basic_string_view/operators/char/2.cc: New file.
11288         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11289         * unittests/basic_string_view/range_access/char/1.cc: New file.
11290         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11291         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11292         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11293         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11294         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11295         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11296         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11297         * unittests/basic_string_view/typedefs.cc: New file.
11298         * unittests/basic_string_view/types/1.cc: New file.
11299
11300 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11301
11302         * common/gdb_string_view.h: Remove libstdc++ implementation
11303         details, adjust to gdb reality.
11304         * common/gdb_string_view.tcc: Likewise.
11305         * cli/cli-script.c (struct string_view): Remove.
11306         (user_args) <m_args>: Change element type to gdb::string_view.
11307         (user_args::insert_args): Adjust.
11308
11309 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11310
11311         * common/gdb_string_view.h: New file.
11312         * common/gdb_string_view.tcc: New file.
11313
11314 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11315
11316         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11317         * configure: Re-generate.
11318
11319 2018-04-09  Pedro Alves  <palves@redhat.com>
11320
11321         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11322         (set_target_gdbarch): Call
11323         gdb::observers::architecture_changed.notify instead of
11324         observer_notify_architecture_changed.
11325
11326 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11327
11328         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11329         (do_restore_current_traceframe_cleanup): Remove.
11330         (restore_current_traceframe_cleanup_dtor): Remove.
11331         (make_cleanup_restore_current_traceframe): Remove.
11332         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11333         New.
11334         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11335         * infrun.c (fetch_inferior_event): Use
11336         scoped_restore_current_traceframe.
11337
11338 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11339
11340         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11341         Remove.
11342         <n_allocated_type_units>: Remove.
11343         <all_type_units>: Change to std::vector.
11344         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11345         to std::vector change.
11346         (dwarf2_per_objfile::get_cutu): Likewise.
11347         (dwarf2_per_objfile::get_tu): Likewise.
11348         (create_signatured_type_table_from_index): Likewise.
11349         (create_signatured_type_table_from_debug_names): Likewise.
11350         (dw2_symtab_iter_next): Likewise.
11351         (dw2_print_stats): Likewise.
11352         (dw2_expand_all_symtabs): Likewise.
11353         (dw2_expand_marked_cus): Likewise.
11354         (dw2_debug_names_iterator::next): Likewise.
11355         (dwarf2_initialize_objfile): Likewise.
11356         (add_signatured_type_cu_to_table): Likewise.
11357         (create_all_type_units): Likewise.
11358         (add_type_unit): Likewise.
11359         (struct tu_abbrev_offset): Add constructor.
11360         (build_type_psymtabs_1): Adjust to std::vector change.
11361         (print_tu_stats): Likewise.
11362         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11363         (write_debug_names): Likewise.
11364
11365 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11366
11367         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11368         Make an std::vector.
11369         <n_comp_units>: Remove.
11370         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11371         to std::vector change.
11372         (dwarf2_per_objfile::get_cutu): Likewise.
11373         (dwarf2_per_objfile::get_cu): Likewise.
11374         (create_cus_from_index): Likewise.
11375         (create_addrmap_from_index): Likewise.
11376         (create_addrmap_from_aranges): Likewise.
11377         (dwarf2_read_index): Likewise.
11378         (dw2_find_last_source_symtab): Likewise.
11379         (dw2_map_symtabs_matching_filename): Likewise.
11380         (dw2_symtab_iter_next): Likewise.
11381         (dw2_print_stats): Likewise.
11382         (dw2_expand_all_symtabs): Likewise.
11383         (dw2_expand_symtabs_with_fullname): Likewise.
11384         (dw2_expand_marked_cus): Likewise.
11385         (dw2_map_symbol_filenames): Likewise.
11386         (create_cus_from_debug_names): Likewise.
11387         (dwarf2_read_debug_names): Likewise.
11388         (dw2_debug_names_iterator::next): Likewise.
11389         (dwarf2_initialize_objfile): Likewise.
11390         (set_partial_user): Likewise.
11391         (dwarf2_build_psymtabs_hard): Likewise.
11392         (read_comp_units_from_section): Remove arguments, adjust to
11393         std::vector change.
11394         (create_all_comp_units): Adjust to std::vector and
11395         read_comp_units_from_section changes.
11396         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11397         change.
11398         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11399         (psyms_seen_size): Likewise.
11400         (write_gdbindex): Likewise.
11401         (write_debug_names): Likewise.
11402
11403 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11404
11405         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11406         with dwarf2_per_objfile.
11407         (create_cus_from_index): Likewise.
11408         (create_signatured_type_table_from_index): Likewise.
11409         (dwarf2_read_index): Likewise.
11410         (dwarf2_initialize_objfile): Likewise.
11411         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11412         per_cu rather than get_dwarf2_per_objfile.
11413
11414 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11415
11416         * dwarf2read.h (struct signatured_type): Forward declare.
11417         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11418         New methods.
11419         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11420         (dw2_get_cutu): ...this.
11421         (dwarf2_per_objfile::get_cu): Rename from...
11422         (dw2_get_cu): ...this.
11423         (dwarf2_per_objfile::get_tu): New.
11424         (create_addrmap_from_index): Adjust.
11425         (create_addrmap_from_aranges): Adjust.
11426         (dw2_find_last_source_symtab): Adjust.
11427         (dw2_map_symtabs_matching_filename): Adjust.
11428         (dw2_symtab_iter_next): Adjust.
11429         (dw2_print_stats): Adjust.
11430         (dw2_expand_all_symtabs): Adjust.
11431         (dw2_expand_symtabs_with_fullname): Adjust.
11432         (dw2_expand_marked_cus): Adjust.
11433         (dw_expand_symtabs_matching_file_matcher): Adjust.
11434         (dw2_map_symbol_filenames): Adjust.
11435         (dw2_debug_names_iterator::next): Adjust.
11436         (dwarf2_initialize_objfile): Adjust.
11437         (set_partial_user): Adjust.
11438         (dwarf2_build_psymtabs_hard): Adjust.
11439
11440 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11441
11442         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11443         Remove unused variables.
11444         (dw2_map_symtabs_matching_filename): Likewise.
11445         (dwarf2_record_block_ranges): Likewise.
11446         (dwarf2_read_addr_index): Likewise.
11447         (follow_die_offset): Likewise.
11448
11449 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11450
11451         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11452         to symbol_file_add_main.
11453
11454 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11455
11456         PR mi/22299
11457         * mi/mi-console.c (do_fputc_async_safe): New.
11458         (mi_console_file::write_async_safe): New.
11459         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11460         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11461         New.
11462         * ui-file.c (ui_file::putstrn): Adjust call to
11463         fputstrn_unfiltered.
11464         * utils.c (printchar): Replace do_fputs and do_fprintf
11465         parameters by do_fputc.
11466         (fputstr_filtered): Adjust call to printchar.
11467         (fputstr_unfiltered): Likewise.
11468         (fputstrn_filtered): Likewise.
11469         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11470         printchar.
11471         * utils.h (do_fputc_ftype): New typedef.
11472         (fputstrn_unfiltered): Add do_fputc parameter.
11473
11474 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11475
11476         * regformats/i386/i386-avx.dat: Remove.
11477
11478 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11479
11480         PR gdb/22979
11481         * amd64-tdep.c (amd64_none_init_abi): New function.
11482         (amd64_x32_none_init_abi): New function.
11483         (_initialize_amd64_tdep): Register handlers for x86-64 and
11484         x64_32 with GDB_OSABI_NONE.
11485         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11486         GDB_OSABI_NONE osabi.
11487
11488 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11489
11490         PR gdb/22980
11491         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11492         GDB_OSABI_NONE.
11493         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11494         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11495
11496 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11497
11498         * common/byte-vector.h (char_vector): New type.
11499         * target.h (target_read_alloc): Return
11500         gdb::optional<byte_vector>.
11501         (target_read_stralloc): Return gdb::optional<char_vector>.
11502         (target_get_osdata): Return gdb::optional<char_vector>.
11503         * target.c (target_read_alloc_1): Templatize.  Replacement
11504         manual memory management with vector.
11505         (target_read_alloc): Change return type, adjust.
11506         (target_read_stralloc): Change return type, adjust.
11507         (target_get_osdata): Change return type, adjust.
11508         * auxv.c (struct auxv_info) <length>: Remove.
11509         <data>: Change type to gdb::optional<byte_vector>.
11510         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11511         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11512         (target_auxv_search): Adjust.
11513         (fprint_target_auxv): Adjust.
11514         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11515         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11516         (linux_make_corefile_notes): Adjust.
11517         * osdata.c (get_osdata): Adjust.
11518         * remote.c (remote_get_threads_with_qxfer): Adjust.
11519         (remote_memory_map): Adjust.
11520         (remote_traceframe_info): Adjust.
11521         (btrace_read_config): Adjust.
11522         (remote_read_btrace): Adjust.
11523         (remote_pid_to_exec_file): Adjust.
11524         * solib-aix.c (solib_aix_get_library_list): Adjust.
11525         * solib-dsbt.c (decode_loadmap): Don't free buf.
11526         (dsbt_get_initial_loadmaps): Adjust.
11527         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11528         * solib-target.c (solib_target_current_sos): Adjust.
11529         * tracepoint.c (sdata_make_value): Adjust.
11530         * xml-support.c (xinclude_start_include): Adjust.
11531         (xml_fetch_content_from_file): Adjust.
11532         * xml-support.h (xml_fetch_another): Change return type.
11533         (xml_fetch_content_from_file): Change return type.
11534         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11535         * xml-tdesc.c (file_read_description_xml): Adjust.
11536         (fetch_available_features_from_target): Change return type.
11537         (target_fetch_description_xml): Adjust.
11538         (target_read_description_xml): Adjust.
11539
11540 2018-04-06  Tom Tromey  <tom@tromey.com>
11541
11542         * value.c (~value): Update.
11543         (struct value) <contents>: Now unique_xmalloc_ptr.
11544         (value_contents_bits_eq, allocate_value_contents)
11545         (value_contents_raw, value_contents_all_raw)
11546         (value_contents_for_printing, value_contents_for_printing_const)
11547         (set_value_enclosing_type): Update.
11548
11549 2018-04-06  Tom Tromey  <tom@tromey.com>
11550
11551         * value.c (range_s): Remove typedef, VEC.
11552         (struct range): Add operator<.
11553         (range_lessthan): Remove.
11554         (ranges_contain): Change type.
11555         (~value): Update.
11556         (struct value) <unavailable, optimized_out>: Now std::vector.
11557         (value_entirely_available)
11558         (value_entirely_covered_by_range_vector)
11559         (value_entirely_unavailable, value_entirely_optimized_out):
11560         Update.
11561         (insert_into_bit_range_vector): Change argument type.
11562         (find_first_range_overlap): Likewise.
11563         (struct ranges_and_idx, value_contents_bits_eq)
11564         (require_not_optimized_out, require_available): Update.
11565         (ranges_copy_adjusted): Change argument types.
11566         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11567
11568 2018-04-06  Tom Tromey  <tom@tromey.com>
11569
11570         * value.c (~value): Update.
11571         (struct value) <parent>: Now a value_ref_ptr.
11572         (value_parent, set_value_parent, value_address, value_copy):
11573         Update.
11574
11575 2018-04-06  Tom Tromey  <tom@tromey.com>
11576
11577         * value.c (struct value): Add constructor, destructor, and member
11578         initializers.
11579         (allocate_value_lazy, value_decref): Update.
11580
11581 2018-04-06  Tom Tromey  <tom@tromey.com>
11582
11583         * value.c (struct value) <released, next>: Remove.
11584         (all_values): Now a std::vector.
11585         (allocate_value_lazy): Update.
11586         (value_next): Remove.
11587         (value_mark, value_free_to_mark, release_value)
11588         (value_release_to_mark): Update.
11589
11590 2018-04-06  Tom Tromey  <tom@tromey.com>
11591
11592         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11593         (free_value_chain): Remove.
11594         * value.c (free_value_chain): Remove.
11595         (value_release_to_mark): Return a std::vector.
11596         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11597         std::vector.
11598         (check_condition): Update.
11599         * eval.c (fetch_subexp_value): Change "val_chain" to a
11600         std::vector.
11601         * breakpoint.c (update_watchpoint): Update.
11602         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11603
11604 2018-04-06  Tom Tromey  <tom@tromey.com>
11605
11606         * value.h (free_all_values): Remove.
11607         * value.c (free_all_values): Remove.
11608
11609 2018-04-06  Tom Tromey  <tom@tromey.com>
11610
11611         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11612         (value_history_chain, value_history_count): Remove.
11613         (value_history): New global.
11614         (record_latest_value, access_value_history, show_values)
11615         (preserve_values): Update.
11616
11617 2018-04-06  Tom Tromey  <tom@tromey.com>
11618
11619         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11620         * varobj.c (varobj_set_display_format, varobj_set_value)
11621         (install_default_visualizer, construct_visualizer)
11622         (install_new_value, ~varobj, varobj_get_value_type)
11623         (my_value_of_variable, varobj_editable_p): Update.
11624         * c-varobj.c (c_describe_child, c_value_of_variable)
11625         (cplus_number_of_children, cplus_describe_child): Update.
11626         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11627         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11628         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11629
11630 2018-04-06  Tom Tromey  <tom@tromey.com>
11631
11632         * printcmd.c (last_examine_address): Change type to
11633         value_ref_ptr.
11634         (do_examine, x_command): Update.
11635
11636 2018-04-06  Tom Tromey  <tom@tromey.com>
11637
11638         * value.c (release_value): Update.
11639         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11640         (struct bpstats) <val>: Now a value_ref_ptr.
11641         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11642         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11643         (~watchpoint, print_it_watchpoint, watch_command_1)
11644         (invalidate_bp_value_on_memory_change): Update.
11645
11646 2018-04-06  Tom Tromey  <tom@tromey.com>
11647
11648         * varobj.c (varobj_clear_saved_item)
11649         (update_dynamic_varobj_children, install_new_value, ~varobj):
11650         Update.
11651         * value.h (value_incref): Move declaration earlier.
11652         (value_decref): Rename from value_free.
11653         (struct value_ref_policy): New.
11654         (value_ref_ptr): New typedef.
11655         (struct value_deleter): Remove.
11656         (gdb_value_up): Remove typedef.
11657         (release_value): Change return type.
11658         (release_value_or_incref): Remove.
11659         * value.c (set_value_parent): Update.
11660         (value_incref): Change return type.
11661         (value_decref): Rename from value_free.
11662         (value_free_to_mark, free_all_values, free_value_chain): Update.
11663         (release_value): Return value_ref_ptr.
11664         (release_value_or_incref): Remove.
11665         (record_latest_value, set_internalvar, clear_internalvar):
11666         Update.
11667         * stack.c (info_frame_command): Don't call value_free.
11668         * python/py-value.c (valpy_dealloc, valpy_new)
11669         (value_to_value_object): Update.
11670         * printcmd.c (do_examine): Update.
11671         * opencl-lang.c (lval_func_free_closure): Update.
11672         * mi/mi-main.c (register_changed_p): Don't call value_free.
11673         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11674         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11675         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11676         value_free.
11677         * guile/scm-value.c (vlscm_free_value_smob)
11678         (vlscm_scm_from_value): Update.
11679         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11680         (frame_unwind_register_unsigned, get_frame_register_bytes)
11681         (put_frame_register_bytes): Don't call value_free.
11682         * findvar.c (address_from_register): Don't call value_free.
11683         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11684         * dwarf2loc.c (entry_data_value_free_closure)
11685         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11686         (dwarf2_evaluate_loc_desc_full): Update.
11687         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11688         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11689         (~watchpoint, watch_command_1)
11690         (invalidate_bp_value_on_memory_change): Update.
11691         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11692
11693 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11694
11695         PR gdb/23022
11696         * warning.m4: Add -Wno-error=deprecated-register.
11697         * configure: Re-generate.
11698
11699 2018-04-05  Tom Tromey  <tom@tromey.com>
11700
11701         * linespec.h: Remove include of "vec.h".
11702
11703 2018-04-05  Tom Tromey  <tom@tromey.com>
11704
11705         * linespec.c (typep): Remove typedef.
11706         (find_methods, find_superclass_methods): Take a std::vector.
11707         (find_method): Use std::vector.
11708
11709 2018-04-05  Tom Tromey  <tom@tromey.com>
11710
11711         * utils.c (compare_strings): Remove.
11712         * utils.h (compare_strings): Remove.
11713         * objc-lang.h (find_imps): Update.
11714         * objc-lang.c (find_methods): Take a std::vector.
11715         (uniquify_strings, find_imps): Likewise.
11716         * linespec.c (find_methods): Take a std::vector.
11717         (decode_objc): Use std::vector.
11718         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11719         a std::vector.
11720         (find_method, find_function_symbols): Use std::vector.
11721
11722 2018-04-05  Tom Tromey  <tom@tromey.com>
11723
11724         * completer.c (completion_tracker::completion_tracker): Remove
11725         cast.
11726         (completion_tracker::discard_completions): Likewise.
11727         * breakpoint.c (ambiguous_names_p): Remove cast.
11728         * ada-lang.c (_initialize_ada_language): Remove cast.
11729         * utils.h (streq): Update.
11730         (streq_hash): Add new declaration.
11731         * utils.c (streq): Return bool.
11732         (streq_hash): New function.
11733
11734 2018-04-05  Tom Tromey  <tom@tromey.com>
11735
11736         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11737         Remove a string copy.
11738
11739 2018-04-05  Tom Tromey  <tom@tromey.com>
11740
11741         * linespec.c (filter_results): Use std::vector.
11742         (decode_line_2, decode_line_full): Update.
11743
11744 2018-04-05  Tom Tromey  <tom@tromey.com>
11745
11746         * linespec.c (canonical_to_fullform): Return std::string.
11747         (filter_results): Update.
11748         (struct decode_line_2_item): Add constructor.
11749         <fullform, displayform>: Now std::string.
11750         (decode_line_2_compare_items): Now a std::sort comparator.
11751         (decode_line_2): Update.
11752
11753 2018-04-05  Tom Tromey  <tom@tromey.com>
11754
11755         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11756         (unexpected_linespec_error): Update.
11757         (linespec_parse_basic, parse_linespec): Update.
11758
11759 2018-04-05  Tom Tromey  <tom@tromey.com>
11760
11761         * linespec.c (linespec_parse_basic): Reindent.
11762
11763 2018-04-05  Tom Tromey  <tom@tromey.com>
11764
11765         * minsyms.h (iterate_over_minimal_symbols): Update.
11766         * minsyms.c (iterate_over_minimal_symbols): Take a
11767         gdb::function_view.
11768         * linespec.c (struct collect_minsyms): Remove.
11769         (compare_msyms): Now a std::sort comparator.
11770         (add_minsym): Add parameters.
11771         (search_minsyms_for_name): Update.  Use std::vector.
11772
11773 2018-04-03  Tom Tromey  <tom@tromey.com>
11774
11775         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11776         gdb::byte_vector.
11777
11778 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11779
11780         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11781
11782 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11783
11784         PR gdb/16959
11785         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11786         printing static type.
11787
11788 2018-04-01  Tom Tromey  <tom@tromey.com>
11789
11790         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11791         (rs6000_xfer_shared_libraries): Update.
11792
11793 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11794
11795         * common/gdb_vecs.h (char_ptr): Remove.
11796         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11797
11798 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11799
11800         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11801         with std::vector.
11802         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11803
11804 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11805
11806         * tracepoint.h (struct uploaded_tp): Initialize fields.
11807         <actions, step_actions, cmd_strings>: Change type to
11808         std::vector<char *>.
11809         * tracepoint.c (get_uploaded_tp): Allocate with new.
11810         (free_uploaded_tps): Free with delete.
11811         (parse_tracepoint_definition): Adjust to std::vector change.
11812         * breakpoint.c (read_uploaded_action): Likewise.
11813         (create_tracepoint_from_upload): Likewise.
11814         * ctf.c (ctf_write_uploaded_tp): Likewise.
11815         (SET_ARRAY_FIELD): Likewise.
11816         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11817
11818 2018-03-30  Tom Tromey  <tom@tromey.com>
11819
11820         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11821         std::unique_ptr.
11822         (svr4_keep_data_in_core): Update.
11823         (svr4_read_so_list): Update.
11824
11825 2018-03-30  Tom Tromey  <tom@tromey.com>
11826
11827         * windows-nat.c (handle_output_debug_string, handle_exception):
11828         Update.
11829         * target.h (target_read_string): Update.
11830         * target.c (target_read_string): Change "string" to
11831         unique_xmalloc_ptr.
11832         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11833         Update.
11834         * solib-frv.c (frv_current_sos): Update.
11835         * solib-dsbt.c (dsbt_current_sos): Update.
11836         * solib-darwin.c (darwin_current_sos): Update.
11837         * linux-thread-db.c (inferior_has_bug): Update.
11838         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11839         Update.  Remove alloca.
11840         * ada-lang.c (ada_main_name): Update.
11841
11842 2018-03-30  Tom Tromey  <tom@tromey.com>
11843
11844         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11845         (struct dwo_file_deleter): New.
11846         (dwo_file_up): New typedef.
11847         (open_and_init_dwo_file): Use dwo_file_up.
11848         (free_dwo_file_cleanup): Remove.
11849
11850 2018-03-30  Tom Tromey  <tom@tromey.com>
11851
11852         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11853         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11854
11855 2018-03-30  Tom Tromey  <tom@tromey.com>
11856
11857         * dwarf2read.c (class free_cached_comp_units): New class.
11858         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11859         (free_cached_comp_units): Remove function.
11860
11861 2018-03-30  Tom Tromey  <tom@tromey.com>
11862
11863         * utils.h (make_cleanup_unpush_target): Remove.
11864         * inf-ptrace.c (struct target_unpusher): New.
11865         (target_unpush_up) New typedef.
11866         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11867         target_unpush_up.
11868         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11869
11870 2018-03-27  Tom Tromey  <tom@tromey.com>
11871
11872         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11873
11874 2018-03-27  Pedro Alves  <palves@redhat.com>
11875             Tom Tromey  <tom@tromey.com>
11876
11877         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11878         destructor.  Now a class.
11879         (gdb_readline_wrapper_cleanup): Remove function.
11880         (gdb_readline_wrapper): Remove cleanups.
11881
11882 2018-03-27  Tom Tromey  <tom@tromey.com>
11883
11884         * typeprint.h (struct type_print_options) <local_typedefs,
11885         global_typedefs>: Remove "struct" keyword.
11886         (class typedef_hash_table): New class.
11887         (recursively_update_typedef_hash, add_template_parameters)
11888         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11889         (find_typedef_in_hash): Don't declare.
11890         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11891         (typedef_hash_table::recursively_update): Rename from
11892         recursively_update_typedef_hash.  Now a member.
11893         (typedef_hash_table::add_template_parameters): Rename from
11894         add_template_parameters.  Now a member.
11895         (typedef_hash_table::typedef_hash_table): Now a constructor;
11896         rename from create_typedef_hash.
11897         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11898         rename from free_typedef_hash.
11899         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11900         (do_free_global_table): Remove.
11901         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11902         from copy_type_recursive.
11903         (create_global_typedef_table): Remove.
11904         (typedef_hash_table::find_global_typedef): Now a member of
11905         typedef_hash_table.
11906         (typedef_hash_table::find_typedef): Rename from
11907         find_typedef_in_hash; now a member.
11908         (whatis_exp): Update.
11909         * extension.h (struct ext_lang_type_printers): Add constructor and
11910         destructor.
11911         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11912         declare.
11913         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11914         Now a constructor; rename from start_ext_lang_type_printers.
11915         (ext_lang_type_printers): Now a destructor; rename from
11916         free_ext_lang_type_printers.
11917         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11918         Update.
11919         (c_type_print_base_struct_union): Update.  Remove cleanups.
11920
11921 2018-03-27  Tom Tromey  <tom@tromey.com>
11922
11923         * dwarf-index-write.c: Include <cmath>.
11924
11925 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11926
11927         * NEWS: Add entry describing new "set|show varsize-limit" command.
11928         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11929         command.
11930         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11931         "set variable".
11932
11933 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11934
11935         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11936         dwarf-index-write.c
11937         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11938         * dwarf-index-common.c: New file.
11939         * dwarf-index-common.h: New file.
11940         * dwarf-index-write.c: New file.
11941         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11942         (struct dwarf2_section_info): Move from here.
11943         (dwarf2_section_info_def): Likewise.
11944         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11945         (offset_type): Likewise.
11946         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11947         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11948         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11949         (byte_swap): Likewise.
11950         (MAYBE_SWAP): Likewise.
11951         (dwarf2_per_cu_ptr): Likewise.
11952         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11953         (struct tu_stats): Likewise.
11954         (struct dwarf2_per_objfile): Likewise.
11955         (struct dwarf2_per_cu_data): Likewise.
11956         (struct signatured_type): Likewise.
11957         (sig_type_ptr): Likewise.
11958         (DEF_VEC_P (sig_type_ptr)): Likewise.
11959         (INDEX4_SUFFIX): Likewise.
11960         (INDEX5_SUFFIX): Likewise.
11961         (DEBUG_STR_SUFFIX): Likewise.
11962         (dwarf2_read_section): Make non-static.
11963         (mapped_index_string_hash): Move from here.
11964         (dwarf5_djb_hash): Likewise.
11965         (file_write): Likewise.
11966         (class data_buf): Likewise.
11967         (struct symtab_index_entry): Likewise.
11968         (struct mapped_symtab): Likewise.
11969         (find_slot): Likewise.
11970         (hash_expand): Likewise.
11971         (add_index_entry): Likewise.
11972         (uniquify_cu_indices): Likewise.
11973         (class c_str_view): Likewise.
11974         (class c_str_view_hasher): Likewise.
11975         (class vector_hasher): Likewise.
11976         (write_hash_table): Likewise.
11977         (psym_index_map): Likewise.
11978         (struct addrmap_index_data): Likewise.
11979         (add_address_entry): Likewise.
11980         (add_address_entry_worker): Likewise.
11981         (write_address_map): Likewise.
11982         (symbol_kind): Likewise.
11983         (write_psymbols): Likewise.
11984         (struct signatured_type_index_data): Likewise.
11985         (write_one_signatured_type): Likewise.
11986         (recursively_count_psymbols): Likewise.
11987         (recursively_write_psymbols): Likewise.
11988         (class debug_names): Likewise.
11989         (check_dwarf64_offsets): Likewise.
11990         (psyms_seen_size): Likewise.
11991         (write_gdbindex): Likewise.
11992         (write_debug_names): Likewise.
11993         (assert_file_size): Likewise.
11994         (write_psymtabs_to_index): Likewise.
11995         (save_gdb_index_command): Likewise.
11996         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11997         command.
11998         * dwarf2read.h: New file.
11999
12000 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12001
12002         PR gdb/22670
12003         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12004         symbol name if the CU's language stores symbol names in linkage
12005         format.
12006         * language.h (struct language_defn)
12007         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12008         all instances of this struct.
12009
12010 2018-03-26  Tom Tromey  <tom@tromey.com>
12011
12012         * stack.c (backtrace_command_1): Remove verbose code.
12013
12014 2018-03-26  Tom Tromey  <tom@tromey.com>
12015
12016         * python/py-framefilter.c (py_print_type): Don't catch
12017         exceptions.  Return void.
12018         (py_print_value): Likewise.
12019         (py_print_single_arg): Likewise.
12020         (enumerate_args): Don't catch exceptions.
12021         (py_print_args): Likewise.
12022         (py_print_frame): Likewise.
12023         (gdbpy_apply_frame_filter): Catch exceptions here.
12024
12025 2018-03-26  Tom Tromey  <tom@tromey.com>
12026
12027         * stack.c (_initialize_stack): Remove trailing newlines from help
12028         text.  Add "Usage" line to "backtrace" help.
12029
12030 2018-03-26  Tom Tromey  <tom@tromey.com>
12031
12032         PR python/16486:
12033         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12034
12035 2018-03-26  Tom Tromey  <tom@tromey.com>
12036
12037         * python/py-framefilter.c (py_print_single_arg): Return
12038         EXT_LANG_BT_ERROR from catch.
12039
12040 2018-03-26  Tom Tromey  <tom@tromey.com>
12041
12042         PR backtrace/15584:
12043         * stack.c (backtrace_command_1): Move some code into no-filters
12044         "if".
12045
12046 2018-03-26  Tom Tromey  <tom@tromey.com>
12047
12048         * python/py-framefilter.c (throw_quit_or_print_exception): New
12049         function.
12050         (gdbpy_apply_frame_filter): Use it.
12051
12052 2018-03-26  Tom Tromey  <tom@tromey.com>
12053
12054         PR cli/17716:
12055         * python/py-framefilter.c (py_print_type, py_print_value)
12056         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12057         RETURN_MASK_ERROR.
12058
12059 2018-03-26  Tom Tromey  <tom@tromey.com>
12060
12061         * python/py-framefilter.c (enumerate_args): Use
12062         gdb::unique_xmalloc_ptr.
12063
12064 2018-03-26  Tom Tromey  <tom@tromey.com>
12065
12066         * python/py-framefilter.c (py_print_frame): Return
12067         EXT_LANG_BT_OK.
12068         (gdbpy_apply_frame_filter): Update comment.
12069         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12070         Remove.
12071         <EXT_LANG_BT_NO_FILTERS>: Change value.
12072
12073 2018-03-26  Tom Tromey  <tom@tromey.com>
12074
12075         PR backtrace/15582:
12076         * stack.c (backtrace_command): Parse "hide" argument.
12077         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12078         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12079         constant.
12080
12081 2018-03-26  Tom Tromey  <tom@tromey.com>
12082
12083         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12084         add "flags".
12085         (backtrace_command): Remove "fulltrace", add "flags".
12086
12087 2018-03-26  Tom Tromey  <tom@tromey.com>
12088
12089         * stack.c (backtrace_command): Rewrite command line parsing.
12090
12091 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12092
12093         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12094
12095 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12096
12097         * filename-seen-cache.h: Add include guard.
12098
12099 2018-03-26  Keith Seitz  <keiths@redhat.com>
12100
12101         * symfile.c (place_section): Remove "struct" from section_addr_info
12102         in comment.
12103         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12104         "struct" keyword from section_addr_info.
12105
12106 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12107
12108         * regformats/regdef.h (reg): Add constructors.
12109
12110 2018-03-25  Pedro Alves  <palves@redhat.com>
12111
12112         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12113         if then/else bodies in var_func_name extraction.
12114
12115 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12116
12117         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12118         lookup_minimal_symbol() to find symbol entry.
12119         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12120
12121 2018-03-23  Keith Seitz  <keiths@redhat.com>
12122
12123         PR c++/22968
12124         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12125         nested type definitions for C++, too.
12126
12127 2018-03-23  Tom Tromey  <tom@tromey.com>
12128
12129         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12130         a typedef.
12131         (macho_register_oso): Remove.
12132         (macho_symtab_read): Take a std::vector.
12133         (oso_el_compare_name): Now a std::sort comparator.
12134         (macho_symfile_read_all_oso): Take a std::vector.
12135         (macho_symfile_read): Use std::vector.  Remove cleanups.
12136
12137 2018-03-22  Tom Tromey  <tom@tromey.com>
12138
12139         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12140         (record_full_goto_bookmark): Use std::string.
12141
12142 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12143
12144         PR tdep/18295
12145         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12146         a single mask.
12147
12148 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12149
12150         * rs6000-tdep.c (store_insn_p): New function.
12151         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12152         and cr_reg to their unshifted values. Use store_insn_p to
12153         match LR saves using either R1 or fdata->alloca_reg. Use
12154         store_insn_p to match CR saves. Set alloca_reg_offset
12155         when alloca_reg and framep are set. Remove lr_reg shift
12156         when assigning to fdata->lr_register.
12157
12158 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12159
12160         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12161         command line args instead of emitting a warning.
12162
12163 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12164
12165         * tracepoint.h (struct static_tracepoint_marker): Initialize
12166         fields, define default constructor, move constructor and move
12167         assignment, disable the rest.
12168         <str_id, extra>: Make std::string.
12169         (release_static_tracepoint_marker): Remove.
12170         (free_current_marker): Remove.
12171         * tracepoint.c (free_current_marker): Remove.
12172         (parse_static_tracepoint_marker_definition): Adjust to
12173         std::string, use new hex2str overload.
12174         (release_static_tracepoint_marker): Remove.
12175         (print_one_static_tracepoint_marker): Get marker by reference
12176         and adjust to std::string.
12177         (info_static_tracepoint_markers_command): Adjust to std::vector
12178         changes
12179         * target.h (static_tracepoint_marker_p): Remove typedef.
12180         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12181         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12182         bool.
12183         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12184         * target-debug.h
12185         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12186         (target_debug_print_std_vector_static_tracepoint_marker): New.
12187         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12188         to...
12189         (target_debug_print_static_tracepoint_marker_p): ... this.
12190         * target-delegates.c: Re-generate.
12191         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12192         Make std::string.
12193         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12194         (decode_static_tracepoint_spec): Adjust to std::vector.
12195         (tracepoint_print_one_detail): Adjust to std::string.
12196         (strace_marker_decode_location): Adjust to std::string.
12197         (update_static_tracepoint): Adjust to std::string, remove call
12198         to release_static_tracepoint_marker.
12199         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12200         Adjust to std::vector.
12201         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12202         (remote_static_tracepoint_markers_by_strid): Adjust to
12203         std::vector.
12204         * common/rsp-low.h (hex2str): New overload with explicit count
12205         of bytes.
12206         * common/rsp-low.c (hex2str): New overload with explicit count
12207         of bytes.
12208         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12209         (_initialize_rsp_low_selftests): Add test_hex2str test.
12210         * unittests/tracepoint-selftests.c
12211         (test_parse_static_tracepoint_marker_definition): Adjust to
12212         std::string.
12213
12214 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12215
12216         * tracepoint.c (parse_static_tracepoint_marker_definition):
12217         Consider case where the definition is followed by more
12218         definitions.
12219         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12220         tracepoint-selftests.c.
12221         * unittests/tracepoint-selftests.c: New.
12222
12223 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12224
12225         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12226         Carvalho.
12227
12228 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12229
12230         * symtab.c (find_pc_sect_line): fixed indentation.
12231
12232 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12233
12234         * symtab.c (find_pc_sect_line): now uses binary search.
12235
12236 2018-03-19  Tom Tromey  <tom@tromey.com>
12237
12238         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12239         "IDENT" production.
12240
12241 2018-03-19  Pedro Alves  <palves@redhat.com>
12242             Tom Tromey  <tom@tromey.com>
12243
12244         * unittests/observable-selftests.c: New file.
12245         * common/observable.h: New file.
12246         * observable.h: New file.
12247         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12248         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12249         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12250         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12251         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12252         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12253         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12254         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12255         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12256         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12257         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12258         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12259         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12260         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12261         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12262         tui/tui-interp.c, valops.c: Update all users.
12263         * tui/tui-hooks.c (tui_bp_created_observer)
12264         (tui_bp_deleted_observer, tui_bp_modified_observer)
12265         (tui_inferior_exit_observer, tui_before_prompt_observer)
12266         (tui_normal_stop_observer, tui_register_changed_observer):
12267         Remove.
12268         (tui_observers_token): New global.
12269         (attach_or_detach, tui_attach_detach_observers): New functions.
12270         (tui_install_hooks, tui_remove_hooks): Use
12271         tui_attach_detach_observers.
12272         * record-btrace.c (record_btrace_thread_observer): Remove.
12273         (record_btrace_thread_observer_token): New global.
12274         * observer.sh: Remove.
12275         * observer.c: Rename to observable.c.
12276         * observable.c (namespace gdb_observers): Define new objects.
12277         (observer_debug): Move into gdb_observers namespace.
12278         (struct observer, struct observer_list, xalloc_observer_list_node)
12279         (xfree_observer_list_node, generic_observer_attach)
12280         (generic_observer_detach, generic_observer_notify): Remove.
12281         (_initialize_observer): Update.
12282         Don't include observer.inc.
12283         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12284         (clean mostlyclean): Likewise.
12285         (observer.h, observer.inc): Remove targets.
12286         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12287         (COMMON_SFILES): Use observable.c, not observer.c.
12288         * .gitignore: Remove observer.h.
12289
12290 2018-03-18  Tom Tromey  <tom@tromey.com>
12291
12292         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12293         gdb::def_vector.
12294         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12295
12296 2018-03-17  Tom Tromey  <tom@tromey.com>
12297
12298         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12299
12300 2018-03-17  Tom Tromey  <tom@tromey.com>
12301
12302         * target.c (class scoped_target_fd): New.
12303         (target_fileio_close_cleanup): Remove.
12304         (target_fileio_read_alloc_1): Use scoped_target_fd.
12305
12306 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12307
12308         * silent-rules.mk: New.
12309         * Makefile.in: Include silent-rules.mk
12310         (srcdir, VPATH, top_srcdir): Move up.
12311         (COMPILE): Add ECHO_CXX.
12312         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12313         (init.c): Add ECHO_INIT_C.
12314         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12315         (version.c): Add ECHO_GEN.
12316         (printcmd.o): Add ECHO_CXX.
12317         (target-float.o): Add ECHO_CXX.
12318         (ada-exp.o): Add ECHO_CXX.
12319         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12320         (insight$(EXEEXT)): Add ECHO_CXXLD.
12321         * gnulib/configure.ac: Add AM_SILENT_RULES.
12322         * gnulib/aclocal.m4: Re-generate.
12323         * gnulib/configure: Re-generate.
12324         * gnulib/import/Makefile.in: Re-generate.
12325
12326 2018-03-16  Tom Tromey  <tom@tromey.com>
12327
12328         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12329         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12330         * utils.c (do_free_section_addr_info)
12331         (make_cleanup_free_section_addr_info): Remove.
12332         * symfile.h (struct other_sections): Add constructor.
12333         (struct section_addr_info): Remove.
12334         (section_addr_info): New typedef.
12335         (struct sym_fns) <sym_offsets>: Change type of parameter.
12336         (build_section_addr_info_from_objfile)
12337         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12338         (default_symfile_offsets, symbol_file_add)
12339         (symbol_file_add_from_bfd)
12340         (build_section_addr_info_from_section_table): Update.
12341         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12342         * symfile.c (alloc_section_addr_info): Remove.
12343         (build_section_addr_info_from_section_table): Change return type.
12344         Update.
12345         (build_section_addr_info_from_bfd)
12346         (build_section_addr_info_from_objfile): Likewise.
12347         (free_section_addr_info): Remove.
12348         (relative_addr_info_to_section_offsets): Change type of "addrs".
12349         (addrs_section_compar): Now a std::sort comparator.
12350         (addrs_section_sort): Change return type.
12351         (addr_info_make_relative): Change type of "addrs".  Update.
12352         (default_symfile_offsets, syms_from_objfile_1)
12353         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12354         (symbol_file_add_separate): Update.
12355         (symbol_file_add): Change type of "addrs".  Update.
12356         (add_symbol_file_command): Update.  Remove cleanups.
12357         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12358         cleanups.
12359         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12360         * solib.c (solib_read_symbols): Update.
12361         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12362         * machoread.c (macho_symfile_offsets): Update.
12363         * jit.c (jit_bfd_try_read_symtab): Update.
12364
12365 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12366
12367         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12368         unittests/utils-selftests.c.
12369         * unittests/utils-selftests.c: New file.
12370
12371 2018-03-14  Tom Tromey  <tom@tromey.com>
12372
12373         PR cli/14977:
12374         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12375         for NULL.
12376
12377 2018-03-14  Tom Tromey  <tom@tromey.com>
12378
12379         PR cli/19918:
12380         * printcmd.c (printf_pointer): Allow "-" in format.
12381
12382 2018-03-14  Tom Tromey  <tom@tromey.com>
12383
12384         * printcmd.c (_initialize_printcmd): Add usage to printf.
12385
12386 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12387
12388         * MAINTAINERS: Update my email address.
12389
12390 2018-03-13  Tom Tromey  <tom@tromey.com>
12391
12392         * machoread.c (macho_check_dsym): Change filenamep to a
12393         std::string*.
12394         (macho_symfile_read): Update.
12395         * symfile.c (load_command): Use std::string.
12396
12397 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12398
12399         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12400         to error message string.
12401         (riscv_register_name): Use xsnprintf instead of sprintf.
12402         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12403         internal_error.
12404         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12405         error.
12406         (riscv_push_dummy_call): Likewise.
12407
12408 2018-03-12  Tom Tromey  <tom@tromey.com>
12409
12410         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12411         Use gdb::byte_vector.
12412         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12413
12414 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12415
12416         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12417         parameter type to readable_regcache.
12418         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12419         the declaration.
12420
12421 2018-03-11  Tom Tromey  <tom@tromey.com>
12422
12423         * dwarf2read.c (struct nextfield): Add initializers.
12424         (struct nextfnfield): Remove.
12425         (struct fnfieldlist): Add initializers.  Remove "length" and
12426         "head", use std::vector.
12427         (struct decl_field_list): Remove.
12428         (struct field_info): Add initializers.
12429         <fields, baseclasses>: Now std::vector.
12430         <nbaseclasses, nfnfields, typedef_field_list_count,
12431         nested_types_list_count>: Remove.
12432         (dwarf2_add_field, dwarf2_add_type_defn)
12433         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12434         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12435         (process_structure_scope): Update.
12436
12437 2018-03-11  Tom Tromey  <tom@tromey.com>
12438
12439         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12440         for use by std::sort.
12441         (build_type_psymtabs_1): Use std::vector.
12442
12443 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12444
12445         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12446         and LIBMPFR in the printed configuration.
12447
12448 2018-03-08  Tom Tromey  <tom@tromey.com>
12449
12450         * source.c (get_filename_and_charpos): Use scoped_fd.
12451         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12452         (procfs_pidlist): Likewise.
12453         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12454         (iterate_over_mappings): Likewise.
12455
12456 2018-03-08  Tom Tromey  <tom@tromey.com>
12457
12458         * infcall.c (struct call_return_meta_info)
12459         <stack_temporaries_enabled>: Remove.
12460         (get_call_return_value, call_function_by_hand_dummy): Update.
12461         * thread.c (disable_thread_stack_temporaries): Remove.
12462         (enable_thread_stack_temporaries): Remove.
12463         (thread_stack_temporaries_enabled_p): Return bool.
12464         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12465         (get_last_thread_stack_temporary): Update.
12466         * eval.c (evaluate_subexp): Update.
12467         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12468         class, not a function.
12469         (value_ptr, value_vec): Remove typedefs.
12470         (class thread_info) <stack_temporaries_enabled>: Now bool.
12471         <stack_temporaries>: Now a std::vector.
12472         (thread_stack_temporaries_enabled_p)
12473         (value_in_thread_stack_temporaries): Return bool.
12474
12475 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12476
12477         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12478         (getpkt_or_notif_sane_1): Likewise.
12479
12480 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12481
12482         * build-id.c (build_id_to_debug_bfd): Use std::string.
12483
12484 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12485
12486         * build-id.c (find_separate_debug_file_by_buildid): Return
12487         std::string.
12488         * build-id.h (find_separate_debug_file_by_buildid): Return
12489         std::string.
12490         * coffread.c (coff_symfile_read): Adjust to std::string.
12491         * elfread.c (elf_symfile_read): Adjust to std::string.
12492         * symfile.c (separate_debug_file_exists): Change parameter to
12493         std::string.
12494         (find_separate_debug_file): Return std::string.
12495         (find_separate_debug_file_by_debuglink): Return std::string.
12496         * symfile.h (find_separate_debug_file_by_debuglink): Return
12497         std::string.
12498
12499 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12500
12501         * common/xml-utils.c (xml_escape_text): Move code to...
12502         (xml_escape_text_append): ... this new function.
12503         * common/xml-utils.h (xml_escape_text_append): New declaration.
12504         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12505         New function.
12506         (_initialize_xml_utils): register test_xml_escape_text_append as
12507         a selftest.
12508
12509 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12510
12511         * defs.h: Remove MAX_REGISTER_SIZE.
12512         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12513         asserts.
12514         * python/py-unwind.c (pyuw_sniffer): Likewise.
12515
12516 2018-03-07  Tom Tromey  <tom@tromey.com>
12517
12518         * linux-tdep.c (linux_info_proc): Update.
12519         * target.h (struct target_ops) <to_fileio_readlink>: Return
12520         optional<string>.
12521         (target_fileio_readlink): Return optional<string>.
12522         * remote.c (remote_hostio_readlink): Return optional<string>.
12523         * inf-child.c (inf_child_fileio_readlink): Return
12524         optional<string>.
12525         * target.c (target_fileio_readlink): Return optional<string>.
12526
12527 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12528
12529         * regcache.c (cooked_read_test): Add riscv to the list of
12530         architectures that have a save_reggroup.
12531
12532 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12533
12534         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12535         value is not a dynamic class object.
12536
12537 2018-03-06  Tom Tromey  <tom@tromey.com>
12538
12539         * rust-exp.y: Formatting fixes.
12540
12541 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12542
12543         * riscv-tdep.c (riscv_register_name): Remove target description
12544         support.
12545         (riscv_gdbarch_init): Remove target description check.
12546
12547 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12548
12549         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12550         comment.
12551         * riscv-tdep.h: Likewise.
12552
12553 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12554
12555         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12556         (riscv_pseudo_register_write): Delete.
12557         (riscv_gdbarch_init): Remove all use of pseudo registers.
12558
12559 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12560
12561         * record-btrace.c (btrace_print_lines): Replace cleanup
12562         parameter with RAII equivalents.
12563         (btrace_insn_history): Replace cleanup with RAII equivalents.
12564         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12565         make_cleanup_ui_out_tuple_begin_end): Remove.
12566         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12567         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12568         make_cleanup_ui_out_list_begin_end): Remove.
12569
12570 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12571
12572         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12573         parameter types to std::vector.  Use bool.
12574         (record_btrace_wait): Replace VEC(tp_t) with
12575         std::vector<thread_info *>.
12576         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12577
12578 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12579
12580         * record-btrace.c (record_btrace_disable_callback): Remove.
12581         (struct scoped_btrace_disable): New.
12582         (record_btrace_open): Use scoped_btrace_disable.
12583
12584 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12585
12586         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12587         reading values from registers.
12588
12589 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12590
12591         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12592         where appropriate.
12593
12594 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12595
12596         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12597         change parameter type.  Use GDB's print functions, and use
12598         core_addr_to_string where appropriate.
12599         (riscv_push_dummy_call): Use core_addr_to_string where
12600         appropriate, update call to riscv_print_arg_location, and reindent
12601         a few lines.
12602         (riscv_return_value): Update call to riscv_print_arg_location.
12603
12604 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12605             Tim Newsome <tim@sifive.com>
12606             Albert Ou <a0u@eecs.berkeley.edu>
12607             Darius Rad <darius@bluespec.com>
12608
12609         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12610         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12611         (ALLDEPFILES): Add riscv-tdep.c
12612         * configure.tgt: Add riscv support.
12613         * riscv-tdep.c: New file.
12614         * riscv-tdep.h: New file.
12615         * NEWS: Mention new target.
12616         * MAINTAINERS: Add entry for riscv.
12617
12618 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12619
12620         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12621         fields within aggregates.
12622
12623 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12624
12625         * record-btrace.c (btrace_print_lines): Change type of flags to
12626         gdb_disassembly_flags.
12627
12628 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12629
12630         * fbsd-nat.c: Include "inf-ptrace.h".
12631         (USE_SIGTRAP_SIGINFO): Conditionally define.
12632         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12633         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12634         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12635         function.
12636         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12637         Likewise.
12638         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12639         Likewise.
12640         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12641         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12642         "supports_stopped_by_hw_breakpoint" target methods.
12643
12644 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12645
12646         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12647         * fbsd-nat.c (debug_fbsd_nat): New variable.
12648         (show_fbsd_nat_debug): New function.
12649         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12650         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12651
12652 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12653
12654         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12655         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12656         prototype.
12657         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12658         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12659         method.
12660
12661 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12662
12663         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12664         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12665
12666 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12667
12668         * charset.c (struct charset_vector): New.
12669         (charsets): Change type to charset_vector.
12670         (find_charset_names): Adjust.
12671         (add_one): Adjust.
12672         (_initialize_charset): Adjust.
12673
12674 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12675
12676         * progspace.h (struct program_space) <deleted_solibs>: Change
12677         type to std::vector<std::string>.
12678         * progspace.c (clear_program_space_solib_cache): Adjust.
12679         * breakpoint.c (print_solib_event): Adjust.
12680         (check_status_catch_solib): Adjust.
12681         * solib.c (update_solib_list): Adjust.
12682         * ui-out.h (class ui_out) <field_string>: New overload.
12683         * ui-out.c (ui_out::field_string): New overload.
12684
12685 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12686
12687         * progspace.h (struct program_space): Add constructor and
12688         destructor, initialize fields.
12689         (add_program_space): Remove.
12690         * progspace.c (add_program_space): Rename to...
12691         (program_space::program_space): ... this.
12692         (release_program_space): Rename to...
12693         (program_space::~program_space): ... this.
12694         (delete_program_space): Use delete to delete program_space.
12695         (initialize_progspace): Use new to allocate program_space.
12696         * inferior.c (add_inferior_with_spaces): Likewise.
12697         (clone_inferior_command): Likewise.
12698         * infrun.c (follow_fork_inferior): Likewise.
12699         (handle_vfork_child_exec_or_exit): Likewise.
12700
12701 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12702
12703         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12704         (delim_string_to_char_ptr_vec): Return std::vector of
12705         gdb::unique_xmalloc_ptr.
12706         (dirnames_to_char_ptr_vec_append): Take std::vector of
12707         gdb::unique_xmalloc_ptr.
12708         (dirnames_to_char_ptr_vec): Return std::vector of
12709         gdb::unique_xmalloc_ptr.
12710         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12711         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12712         (delim_string_to_char_ptr_vec): Return an std::vector of
12713         gdb::unique_xmalloc_ptr, adjust the code.
12714         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12715         gdb::unique_xmalloc_ptr, adjust the code.
12716         (dirnames_to_char_ptr_vec): Return an std::vector of
12717         gdb::unique_xmalloc_ptr, adjust the code.
12718         * auto-load.c (auto_load_safe_path_vec): Change type to
12719         std::vector of gdb::unique_xmalloc_ptr.
12720         (auto_load_expand_dir_vars): Return an std::vector of
12721         gdb::unique_xmalloc_ptr, adjust the code.
12722         (auto_load_safe_path_vec_update): Adjust.
12723         (filename_is_in_auto_load_safe_path_vec): Adjust.
12724         (auto_load_objfile_script_1): Adjust.
12725         * build-id.c (build_id_to_debug_bfd): Adjust.
12726         * linux-thread-db.c (thread_db_load_search): Adjust.
12727         * source.c (add_path): Adjust.
12728         (openp): Adjust.
12729         * symfile.c (find_separate_debug_file): Adjust.
12730         * utils.c (do_free_char_ptr_vec): Remove.
12731         (make_cleanup_free_char_ptr_vec): Remove.
12732
12733 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12734
12735         PR gdb/22907
12736         * common/pathstuff.c: Conditionally include "<windows.h>".
12737
12738 2018-03-01  Georg Sauthoff  <mail@georg.so>
12739
12740         PR gdb/22888
12741         * gcore.in: Quote variables and switch interpreter to bash.
12742
12743 2018-03-01  Tom Tromey  <tom@tromey.com>
12744
12745         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12746         assertion.  Add assertion for discriminant_index.
12747         (quirk_rust_enum): Use correct base type name in univariant case.
12748
12749 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12750
12751         * record.c (get_call_history_modifiers): Return a
12752         record_print_flags.
12753         (cmd_record_call_history): Adjust.
12754         * record-btrace.c (record_btrace_call_history): Adjust.
12755         (record_btrace_call_history_range): Adjust.
12756         (record_btrace_call_history_from): Adjust.
12757         * target-debug.h (target_debug_print_record_print_flags): New.
12758         * target-delegates.c: Re-generate.
12759         * target.c (target_call_history): Change flags type.
12760         (target_call_history_from): Likewise.
12761         (target_call_history_range): Likewise.
12762         * target.h (struct target_ops) <target_call_history>: Likewise.
12763         (target_call_history_from): Likewise.
12764         (target_call_history_range): Likewise.
12765
12766 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12767             Simon Marchi  <simon.marchi@polymtl.ca>
12768
12769         * common/common-utils.c: Include "sys/stat.h".
12770         (is_regular_file): Move here from "source.c"; change return
12771         type to "bool".
12772         * common/common-utils.h (is_regular_file): New prototype.
12773         * common/pathstuff.c (contains_dir_separator): New function.
12774         * common/pathstuff.h (contains_dir_separator): New prototype.
12775         * source.c: Don't include "sys/stat.h".
12776         (is_regular_file): Move to "common/common-utils.c".
12777
12778 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12779
12780         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12781         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12782         * auto-load.c: Include "common/pathstuff.h".
12783         * common/common-def.h (current_directory): Move here.
12784         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12785         function.
12786         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12787         prototype.
12788         * common/pathstuff.c: New file.
12789         * common/pathstuff.h: New file.
12790         * compile/compile.c: Include "common/pathstuff.h".
12791         * defs.h (current_directory): Move to "common/common-defs.h".
12792         * dwarf2read.c: Include "common/pathstuff.h".
12793         * exec.c: Likewise.
12794         * guile/scm-safe-call.c: Likewise.
12795         * linux-thread-db.c: Likewise.
12796         * main.c: Likewise.
12797         * nto-tdep.c: Likewise.
12798         * objfiles.c: Likewise.
12799         * source.c: Likewise.
12800         * symtab.c: Likewise.
12801         * utils.c: Include "common/pathstuff.h".
12802         (gdb_realpath): Move to "common/pathstuff.c".
12803         (gdb_realpath_keepfile): Likewise.
12804         (gdb_abspath): Likewise.
12805         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12806         (gdb_realpath_keepfile): Likewise.
12807         (gdb_abspath): Likewise.
12808
12809 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12810
12811         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12812         wildcard process pid for super_resume for kernels with a
12813         specific bug.
12814
12815 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12816
12817         * compile/compile.c (get_args): Add additional comments
12818         explaining function.
12819
12820 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12821             Tom Tromey  <tom@tromey.com>
12822
12823         * target.h (memory_write_request_s): Remove typedef.  Don't define
12824         VEC.
12825         (target_write_memory_blocks): Change argument to std::vector.
12826         (struct memory_write_request): Add constructor.
12827         * target-memory.c (compare_block_starting_address): Return bool.
12828         Change argument types.
12829         (claim_memory): Change arguments to use std::vector.
12830         (split_regular_and_flash_blocks, blocks_to_erase)
12831         (compute_garbled_blocks): Likewise.
12832         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12833         (target_write_memory_blocks): Change argument to std::vector.
12834         * symfile.c (struct load_section_data): Add constructor and
12835         destructor.  Use std::vector for "requests".
12836         (struct load_progress_data): Add initializers.
12837         (load_section_callback): Update.  Use "new".
12838         (clear_memory_write_data): Remove.
12839         (generic_load): Update.
12840
12841 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12842
12843         * arch/aarch64.h: Use common/tdesc.h.
12844
12845 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12846
12847         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12848         architecture with a 64-bit ABI.
12849
12850 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12851
12852         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12853         ahead of target description loading.
12854
12855 2018-02-26  Tom Tromey  <tom@tromey.com>
12856
12857         * stack.c (backtrace_command_1): Update.
12858         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12859         of "flags".
12860         * python/py-framefilter.c (py_print_frame)
12861         (gdbpy_apply_frame_filter): Change type of "flags".
12862         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12863         of "flags".
12864         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12865         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12866         * extension.h (enum frame_filter_flag): Rename from
12867         frame_filter_flags.
12868         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12869         (apply_ext_lang_frame_filter): Change type of "flags".
12870         * extension.c (apply_ext_lang_frame_filter): Change type of
12871         "flags".
12872         * extension-priv.h (struct extension_language_ops)
12873         <apply_frame_filter>: Change type of "flags".
12874
12875 2018-02-26  Tom Tromey  <tom@tromey.com>
12876
12877         PR python/16497:
12878         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12879         off-by-one in py_end computation.
12880         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12881         PRINT_MORE_FRAMES.
12882         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12883         constant.
12884
12885 2018-02-26  Tom Tromey  <tom@tromey.com>
12886
12887         * dwarf2read.c (struct variant_field): New.
12888         (struct nextfield) <variant>: New field.
12889         (dwarf2_add_field): Handle DW_TAG_variant_part.
12890         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12891         discriminated union.
12892         (read_structure_type): Handle DW_TAG_variant_part.
12893         (handle_struct_member_die): New function, extracted from
12894         process_structure_scope.  Handle DW_TAG_variant.
12895         (process_structure_scope): Handle discriminated unions.  Call
12896         handle_struct_member_die.
12897
12898 2018-02-26  Tom Tromey  <tom@tromey.com>
12899
12900         * rust-lang.h (rust_last_path_segment): Declare.
12901         * rust-lang.c (rust_last_path_segment): Now public.  Change
12902         contract.
12903         (struct disr_info): Remove.
12904         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12905         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12906         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12907         (rust_enum_p, rust_enum_variant): New function.
12908         (rust_underscore_fields): Remove "offset" parameter.
12909         (rust_print_enum): New function.
12910         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12911         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12912         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12913         enums.
12914         (rust_internal_print_type): New function, from rust_print_type.
12915         Remove enum code.
12916         (rust_print_type): Call rust_internal_print_type.
12917         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12918         Update enum handling.
12919         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12920         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12921         (rust_union_quirks): New functions.
12922         (process_full_comp_unit, process_full_type_unit): Call
12923         rust_union_quirks.
12924         (process_structure_scope): Update rust_unions if necessary.
12925
12926 2018-02-26  Tom Tromey  <tom@tromey.com>
12927
12928         * value.h (value_union_variant): Declare.
12929         * valops.c (value_union_variant): New function.
12930         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12931         (struct discriminant_info): New.
12932         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12933         enumerator.
12934         (struct main_type) <flag_discriminated_union>: New field.
12935
12936 2018-02-26  Tom Tromey  <tom@tromey.com>
12937
12938         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12939         unittests/unpack-selftests.c.
12940         * unittests/unpack-selftests.c: New file.
12941         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12942
12943 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12944
12945         * dwarf2read.c (struct partial_die_info) <read>: New method.
12946         (read_partial_die): Remove the declaration.
12947         (load_partial_dies): Update.
12948         (partial_die_info::partial_die_info):
12949         (read_partial_die): Change it to partial_die_info::read.
12950
12951 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12952
12953         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12954         (fixup_partial_die): Remove declaration.
12955         (scan_partial_symbols): Update.
12956         (partial_die_parent_scope): Likewise.
12957         (partial_die_full_name): Likewise.
12958         (fixup_partial_die): Change it to partial_die_info::fixup.
12959
12960 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12961
12962         * dwarf2read.c (read_partial_die): Update the declaration.
12963         (load_partial_dies): Caller update.
12964         (read_partial_die): Remove one argument abbrev_len.
12965
12966 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12967
12968         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12969         assignment operator.
12970         (load_partial_dies): Use ctor and copy ctor.
12971         (read_partial_die): Update.
12972         (dwarf2_cu::find_partial_die): Use ctor.
12973
12974 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12975
12976         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12977         (find_partial_die_in_comp_unit): Change it to
12978         dwarf2_cu::find_partial_die.
12979         (find_partial_die): Update.
12980
12981 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12982
12983         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12984         is NULL.
12985
12986 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12987
12988         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12989
12990 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12991
12992         * arch/amd64.h: Use common/tdesc.h.
12993         * arch/i386.c: Likewise.
12994         * arch/i386.h: Likewise.
12995         * arch/tic6x.c: Likewise.
12996         * arch/tdesc.h: Move file from here...
12997         * common/tdesc.h: ...to here.
12998         * features/aarch64-core.c: Regenerate.
12999         * features/aarch64-fpu.c: Regenerate.
13000         * features/i386/32bit-avx.c: Regenerate.
13001         * features/i386/32bit-avx512.c: Regenerate.
13002         * features/i386/32bit-core.c: Regenerate.
13003         * features/i386/32bit-linux.c: Regenerate.
13004         * features/i386/32bit-mpx.c: Regenerate.
13005         * features/i386/32bit-pkeys.c: Regenerate.
13006         * features/i386/32bit-sse.c: Regenerate.
13007         * features/i386/64bit-avx.c: Regenerate.
13008         * features/i386/64bit-avx512.c: Regenerate.
13009         * features/i386/64bit-core.c: Regenerate.
13010         * features/i386/64bit-linux.c: Regenerate.
13011         * features/i386/64bit-mpx.c: Regenerate.
13012         * features/i386/64bit-pkeys.c: Regenerate.
13013         * features/i386/64bit-segments.c: Regenerate.
13014         * features/i386/64bit-sse.c: Regenerate.
13015         * features/i386/x32-core.c: Regenerate.
13016         * features/tic6x-c6xp.c: Regenerate.
13017         * features/tic6x-core.c: Regenerate.
13018         * features/tic6x-gp.c: Regenerate.
13019         * target-descriptions.c: Use common/tdesc.h.
13020         * target-descriptions.h: Likewise.
13021
13022 2018-02-24  Tom Tromey  <tom@tromey.com>
13023
13024         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13025         (try_thread_db_load_from_dir, thread_db_load_search): Use
13026         std::string.
13027         (info_auto_load_libthread_db_compare): Return bool.  Change
13028         argument types.
13029         (info_auto_load_libthread_db): Use std::vector, std::string.
13030         Remove cleanups.
13031
13032 2018-02-24  Tom Tromey  <tom@tromey.com>
13033
13034         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13035         std::string.
13036         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13037         std::string*.
13038         * gdbarch.c: Rebuild.
13039         * gdbarch.h: Rebuild.
13040         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13041         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13042         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13043         std::string*.
13044
13045 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13046
13047         * gdbtypes.h (sect_offset): Change type to uint64_t.
13048         (sect_offset_str): New function.
13049         * dwarf2read.c (create_addrmap_from_aranges): Use
13050         sect_offset_str.
13051         (error_check_comp_unit_head): Likewise.
13052         (create_debug_type_hash_table): Likewise.
13053         (read_cutu_die_from_dwo): Likewise.
13054         (init_cutu_and_read_dies): Likewise.
13055         (init_cutu_and_read_dies_no_follow): Likewise.
13056         (process_psymtab_comp_unit_reader): Likewise.
13057         (partial_die_parent_scope): Likewise.
13058         (peek_die_abbrev): Likewise.
13059         (process_queue): Likewise.
13060         (dwarf2_physname): Likewise.
13061         (read_namespace_alias): Likewise.
13062         (read_import_statement): Likewise.
13063         (create_dwo_cu_reader): Likewise.
13064         (create_cus_hash_table): Likewise.
13065         (lookup_dwo_cutu): Likewise.
13066         (inherit_abstract_dies): Likewise.
13067         (read_func_scope): Likewise.
13068         (read_call_site_scope): Likewise.
13069         (dwarf2_add_member_fn): Likewise.
13070         (read_common_block): Likewise.
13071         (read_module_type): Likewise.
13072         (read_typedef): Likewise.
13073         (read_subrange_type): Likewise.
13074         (load_partial_dies): Likewise.
13075         (read_partial_die): Likewise.
13076         (find_partial_die): Likewise.
13077         (read_str_index): Likewise.
13078         (dwarf2_string_attr): Likewise.
13079         (build_error_marker_type): Likewise.
13080         (lookup_die_type): Likewise.
13081         (dump_die_shallow): Likewise.
13082         (follow_die_ref): Likewise.
13083         (dwarf2_fetch_die_loc_sect_off): Likewise.
13084         (dwarf2_fetch_constant_bytes): Likewise.
13085         (follow_die_sig): Likewise.
13086         (get_signatured_type): Likewise.
13087         (get_DW_AT_signature_type): Likewise.
13088         (dwarf2_find_containing_comp_unit): Likewise.
13089         (set_die_type): Likewise.
13090
13091 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13092
13093         * arch/aarch64.c: Include "common-defs.h".
13094         * arch/amd64.c: Likewise.
13095         * arch/i386.c: Likewise.
13096
13097 2018-02-21  Tom Tromey  <tom@tromey.com>
13098
13099         * value.h: (extract_field_op): Update.
13100         * eval.c (extract_field_op): Return a const char *.
13101         * expression.h (parse_expression_for_completion): Update.
13102         * completer.c (complete_expression): Update.
13103         (add_struct_fields): Make fieldname const.
13104         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13105         (mark_completion_tag, parse_exp_in_context_1): Update.
13106         (parse_expression_for_completion): Change "name" to
13107         unique_xmalloc_ptr*.
13108
13109 2018-02-21  Tom Tromey  <tom@tromey.com>
13110
13111         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13112
13113 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13114
13115         * avr-tdep.c (avr_read_pc): Change parameter type to
13116         readable_regcache.
13117         * gdbarch.sh (read_pc): Likewise.
13118         * gdbarch.c: Re-generated.
13119         * gdbarch.h: Re-generated.
13120         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13121         readable_regcache.
13122         * ia64-tdep.c (ia64_read_pc): Likewise.
13123         * mips-tdep.c (mips_read_pc): Likewise.
13124         * spu-tdep.c (spu_read_pc): Likewise.
13125
13126 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13127
13128         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13129         * regcache-dump.c: New file.
13130         * regcache.c: Move register_dump to regcache-dump.c.
13131         (maintenance_print_registers): Likewise.
13132         (maintenance_print_raw_registers): Likewise.
13133         (maintenance_print_cooked_registers): Likewise.
13134         (maintenance_print_register_groups): Likewise.
13135         (maintenance_print_remote_registers): Likewise.
13136         (_initialize_regcache): Likewise.
13137         * regcache.h (register_dump): Moved from regcache.c.
13138
13139 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13140
13141         * regcache.c (regcache::regcache): Update.
13142         (regcache::invalidate): Move it to detached_regcache::invalidate.
13143         (get_thread_arch_aspace_regcache): Update.
13144         (regcache::raw_update): Update.
13145         (regcache::cooked_read): Remove some code.
13146         (regcache::cooked_read_value): Likewise.
13147         (regcache::raw_write): Remove assert on m_readonly_p.
13148         (regcache::raw_supply_integer): Move it to
13149         detached_regcache::raw_supply_integer.
13150         (regcache::raw_supply_zeroed): Likewise.
13151         * regcache.h (detached_regcache) <raw_supply_integer>: New
13152         declaration.
13153         <raw_supply_zeroed, invalidate>: Likewise.
13154         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13155         <invalidate>: Likewise.
13156         <m_readonly_p>: Removed.
13157
13158 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13159
13160         * infcmd.c (get_return_value): Let stop_regs point to
13161         get_current_regcache.
13162         * regcache.c (regcache::regcache): Remove.
13163         (register_dump_reg_buffer): New class.
13164         (regcache_print): Adjust.
13165         * regcache.h (regcache): Remove constructors.
13166
13167 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13168
13169         * regcache.c (class register_dump): New class.
13170         (register_dump_regcache, register_dump_none): New class.
13171         (register_dump_remote, register_dump_groups): New class.
13172         (regcache_print): Update.
13173         * regcache.h (regcache_dump_what): Move it to regcache.c.
13174         (regcache) <dump>: Remove.
13175
13176 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13177
13178         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13179          reg_buffer_rw *.
13180         (jit_unwind_reg_set_impl): Call raw_supply.
13181         (jit_frame_sniffer): Use reg_buffer_rw.
13182         * record-full.c (record_full_core_regbuf): Change its type.
13183         (record_full_core_open_1): Use reg_buffer_rw.
13184         (record_full_close): Likewise.
13185         (record_full_core_fetch_registers): Use regcache->raw_supply.
13186         (record_full_core_store_registers): Likewise.
13187         * regcache.c (regcache::get_register_status): Move it to
13188         reg_buffer.
13189         (regcache_raw_set_cached_value): Remove.
13190         (regcache::raw_set_cached_value): Remove.
13191         (regcache::raw_write): Call raw_supply.
13192         (regcache::raw_supply): Move it to reg_buffer_rw.
13193         * regcache.h (regcache_raw_set_cached_value): Remove.
13194         (reg_buffer_rw): New class.
13195
13196 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13197
13198         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13199         readonly_detached_regcache.
13200         (dummy_frame_prev_register): Use regcache->cooked_read.
13201         * frame.c (frame_save_as_regcache): Change return type.
13202         (frame_pop): Update.
13203         * frame.h (frame_save_as_regcache): Update declaration.
13204         * inferior.h (get_infcall_suspend_state_regcache): Update
13205         declaration.
13206         * infrun.c (infcall_suspend_state) <registers>: use
13207         readonly_detached_regcache.
13208         (save_infcall_suspend_state): Don't use regcache_dup.
13209         (get_infcall_suspend_state_regcache): Change return type.
13210         * linux-fork.c (struct fork_info) <savedregs>: Change to
13211         readonly_detached_regcache.
13212         <pc>: New field.
13213         (fork_save_infrun_state): Don't use regcache_dup.
13214         (info_checkpoints_command): Adjust.
13215         * mi/mi-main.c (register_changed_p): Update declaration.
13216         (mi_cmd_data_list_changed_registers): Use
13217         readonly_detached_regcache.
13218         (register_changed_p): Change parameter type to
13219         readonly_detached_regcache.
13220         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13221         readonly_detached_regcache.
13222         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13223         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13224         New.
13225         (regcache::save): Move it to reg_buffer.
13226         (regcache::restore): Change parameter type.
13227         (regcache_dup): Remove.
13228         * regcache.h (reg_buffer) <save>: New method.
13229         (readonly_detached_regcache): New class.
13230         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13231         readonly_detached_regcache.
13232         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13233
13234 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13235
13236         * frame.c (frame_save_as_regcache): Use regcache method save.
13237         (frame_pop): Use regcache method restore.
13238         * infrun.c (restore_infcall_suspend_state): Likewise.
13239         * linux-fork.c (fork_load_infrun_state): Likewise.
13240         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13241         save.
13242         * regcache.c (regcache_save): Remove.
13243         (regcache::restore): More asserts.
13244         (regcache_cpy): Remove.
13245         * regcache.h (regcache_save): Remove the declaration.
13246         (regcache::restore): Move from private to public.
13247         Remove the friend declaration of regcache_cpy.
13248         (regcache_cpy): Remove declaration.
13249
13250 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13251
13252         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13253         parameter type to 'readable_regcache *'.
13254         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13255         * arm-tdep.c (arm_neon_quad_read): Likewise.
13256         (arm_pseudo_read): Likewise.
13257         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13258         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13259         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13260         * gdbarch.c: Re-generated.
13261         * gdbarch.h: Re-generated.
13262         * gdbarch.sh (pseudo_register_read): Change parameter type to
13263         'readable_regcache *'.
13264         (pseudo_register_read_value): Likewise.
13265         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13266         (h8300_pseudo_register_read): Likewise.
13267         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13268         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13269         (i386_pseudo_register_read_into_value): Likewise.
13270         (i386_pseudo_register_read_value): Likewise.
13271         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13272         declaration.
13273         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13274         * m32c-tdep.c (m32c_raw_read): Likewise.
13275         (m32c_read_flg): Likewise.
13276         (m32c_banked_register): Likewise.
13277         (m32c_banked_read): Likewise.
13278         (m32c_sb_read): Likewise.
13279         (m32c_part_read): Likewise.
13280         (m32c_cat_read): Likewise.
13281         (m32c_r3r2r1r0_read): Likewise.
13282         (m32c_pseudo_register_read): Likewise.
13283         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13284         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13285         (mep_pseudo_cr64_read): Likewise.
13286         (mep_pseudo_register_read): Likewise.
13287         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13288         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13289         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13290         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13291         (regcache::cooked_read): Likewise.
13292         (regcache::cooked_read_value): Likewise.
13293         (regcache_cooked_read_signed):
13294         (regcache::cooked_read): Likewise.
13295         * regcache.h (readable_regcache): New class.
13296         (regcache): Inherit readable_regcache.  Move some methods to
13297         readable_regcache.
13298         * rl78-tdep.c (rl78_pseudo_register_read): Change
13299         parameter type to 'readable_regcache *'.
13300         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13301         (e500_pseudo_register_read): Change parameter type to
13302         'readable_regcache *'.
13303         (dfp_pseudo_register_read): Likewise.
13304         (vsx_pseudo_register_read): Likewise.
13305         (efpr_pseudo_register_read): Likewise.
13306         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13307         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13308         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13309         (sh64_pseudo_register_read): Likewise.
13310         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13311         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13312         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13313         (spu_pseudo_register_read): Likewise.
13314         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13315         (xtensa_pseudo_register_read): Likewise.
13316
13317 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13318
13319         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13320         (regcache::arch): Move it to reg_buffer::arch.
13321         (regcache::register_buffer): Likewise.
13322         (regcache::assert_regnum): Likewise.
13323         (regcache::num_raw_registers): Likewise.
13324         * regcache.h (reg_buffer): New class.
13325         (regcache): Inherit reg_buffer.
13326
13327 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13328
13329         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13330         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13331
13332 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13333
13334         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13335
13336 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13337
13338         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13339         (SFILES): Remove common/*.c files.
13340         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13341         * common/common.host: Add common reference.
13342         * configure.ac: Likewise.
13343         * configure: Regenerate.
13344
13345 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13346
13347         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13348         (block_initialize_namespace): Use new.
13349         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13350         (dwarf2_free_objfile): Use delete.
13351         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13352         (copy_type_recursive): Use new.
13353         * gdb_obstack.h (allocate_on_obstack): New.
13354
13355 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13356
13357         PR gdb/22849
13358         * inferior.c (exit_inferior_1): Reset inf->control.
13359
13360 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13361
13362         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13363         declaration.
13364
13365 2018-02-14  Pedro Alves  <palves@redhat.com>
13366
13367         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13368         frame_cleanup_after_sniffer on exception.
13369
13370 2018-02-14  Tom Tromey  <tom@tromey.com>
13371
13372         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13373         const.
13374         (solib_bfd_open): Make pathname const.
13375         * solib.c (solib_bfd_open): Make pathname const.
13376         * solib-spu.c (spu_bfd_fopen): Make name const.
13377         (spu_bfd_open): Make pathname const.
13378         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13379         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13380
13381 2018-02-14  Tom Tromey  <tom@tromey.com>
13382
13383         * symfile.c (symfile_bfd_open): Update.
13384         * source.h (openp, source_full_path_of, find_and_open_source):
13385         Change argument type to unique_xmalloc_ptr.
13386         * source.c (openp): Take a unique_xmalloc_ptr.
13387         (source_full_path_of, find_and_open_source): Likewise.
13388         (open_source_file, symtab_to_fullname): Update.
13389         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13390         unique_xmalloc_ptr.
13391         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13392         (exec_file_find): Update.
13393         * psymtab.c (psymtab_to_fullname): Update.
13394         * nto-tdep.h (nto_find_and_open_solib): Update.
13395         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13396         unique_xmalloc_ptr.
13397         * exec.c (exec_file_attach): Update.
13398         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13399         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13400
13401 2018-02-14  Tom Tromey  <tom@tromey.com>
13402
13403         * solib.c: Include source.h.
13404         * nto-tdep.c: Include source.h.
13405         * mi/mi-cmd-env.c: Include source.h.
13406         * infcmd.c: Include source.h.
13407         * exec.c: Include source.h.
13408         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13409         (add_path, directory_switch, source_path, init_source_path): Move
13410         declarations...
13411         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13412         (add_path, directory_switch, source_path, init_source_path):
13413         ...here.
13414
13415 2018-02-14  Tom Tromey  <tom@tromey.com>
13416
13417         * solist.h (exec_file_find, solib_find): Return
13418         unique_xmalloc_ptr.
13419         (solib_bfd_fopen): Take a const char *.
13420         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13421         (exec_file_find, solib_find): Likewise.
13422         (solib_bfd_fopen): Do not take ownership of "pathname".
13423         (solib_bfd_open): Use unique_xmalloc_ptr.
13424         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13425         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13426         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13427         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13428
13429 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13430
13431         * ada-lang.c (name_match_type_from_name): Remove reference to
13432         ada_name_for_lookup in function's documentation.
13433         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13434
13435 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13436
13437         * defs.h (enum openp_flags): New enum.
13438         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13439         Move to enum openp_flags.
13440         (openp_flags): New enum flags.
13441         (openp): Change parameter type to openp_flags.
13442         * source.c (openp): Change parameter type to openp_flags.
13443         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13444         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13445
13446 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13447
13448         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13449         per-command.
13450
13451 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13452
13453         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13454         into...
13455         (class dwarf2_queue_guard): ...the destructor of this new class.
13456         (dw2_do_instantiate_symtab): Create instance of the new class
13457         dwarf2_queue_guard, remove cleanup.
13458
13459 2018-02-09  Tom Tromey  <tom@tromey.com>
13460
13461         * source.c (find_source_lines): Don't reference past the end of
13462         the vector.
13463
13464 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13465
13466         * remote.c (remote_btrace_maybe_reopen): Change error message.
13467         * btrace.c (btrace_enable): Likewise.
13468         (parse_xml_btrace): Likewise.
13469         (parse_xml_btrace_conf): Likewise.
13470
13471 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13472
13473         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13474         (linux_enable_pt, linux_enable_bts): Call
13475         diagnose_perf_event_open_fail.
13476
13477 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13478
13479         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13480         Remove parameter and change return type.  Update callers.  Move it.
13481         (linux_enable_bts, linux_enable_pt): Improve error message.
13482         (linux_enable_pt): Remove zero buffer size check.
13483         (linux_enable_btrace): Improve error messages.  Remove NULL return
13484         check.
13485
13486 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13487
13488         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13489         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13490         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13491         (linux_supports_pt, linux_supports_btrace): Remove.
13492         (linux_enable_bts): Call cpu_supports_bts.
13493         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13494         * remote.c (remote_supports_btrace): Remove.
13495         (init_remote_ops): Remove remote_supports_btrace.
13496         * target-delegates.c: Regenerated.
13497         * target.c (target_supports_btrace): Remove.
13498         * target.h (target_ops) <to_supports_btrace>: Remove
13499         (target_supports_btrace): Remove.
13500         * x86-linux-nat.c (x86_linux_create_target): Remove
13501         linux_supports_btrace.
13502
13503 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13504
13505         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13506         btrace failed.
13507         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13508         exception and use message in own exception.
13509
13510 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13511
13512         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13513         (perf_event_pt_event_type): Use gdb_file_up.
13514         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13515         scoped_fd, and scoped_mmap.
13516
13517 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13518
13519         * common/scoped_mmap.h: New.
13520         * unittests/scoped_mmap-selftest.c: New.
13521         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13522         unittests/scoped_mmap-selftest.c.
13523
13524 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13525
13526         * common/scoped_fd.h: New.
13527         * unittests/scoped_fd-selftest.c: New.
13528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13529         unittests/scoped_fd-selftest.c.
13530
13531 2018-02-09  Tom Tromey  <tom@tromey.com>
13532
13533         * auto-load.c (auto_load_section_scripts): Use
13534         gdb::unique_xmalloc_ptr.
13535
13536 2018-02-09  Tom Tromey  <tom@tromey.com>
13537
13538         * auto-load.c (execute_script_contents): Use std::string.
13539
13540 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13541
13542         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13543         Python function, rather than a new command.
13544
13545 2018-02-08  Tom Tromey  <tom@tromey.com>
13546
13547         * solib.c (solib_find_1): Use std::string.
13548         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13549
13550 2018-02-08  Tom Tromey  <tom@tromey.com>
13551
13552         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13553
13554 2018-02-08  Tom Tromey  <tom@tromey.com>
13555
13556         * source.c (find_source_lines): Use gdb::def_vector.
13557
13558 2018-02-08  Tom Tromey  <tom@tromey.com>
13559
13560         * macrocmd.c (struct temporary_macro_definition): New.
13561         (macro_define_command): Use temporary_macro_definition.  Remove
13562         cleanups.
13563         (free_macro_definition_ptr): Remove.
13564
13565 2018-02-08  Tom Tromey  <tom@tromey.com>
13566
13567         * macroexp.c (maybe_expand): Use std::string.
13568
13569 2018-02-08  Tom Tromey  <tom@tromey.com>
13570
13571         * macroexp.c (struct macro_buffer): Add initializers for some
13572         members.
13573         (init_buffer, init_shared_buffer, free_buffer)
13574         (free_buffer_return_text): Remove.
13575         (macro_buffer): New constructors.
13576         (~macro_buffer): New destructor.
13577         (macro_buffer::set_shared): New method.
13578         (macro_buffer::resize_buffer, macro_buffer::appendc)
13579         (macro_buffer::appendmem): Now methods, not free functions.
13580         (set_token, append_tokens_without_splicing, stringify)
13581         (macro_stringify): Update.
13582         (gather_arguments): Change return type.  Remove argc_p argument,
13583         add args_ptr argument.  Use std::vector.
13584         (substitute_args): Remove argc argument.  Accept std::vector.
13585         (expand): Update.  Use std::vector.
13586         (scan, macro_expand, macro_expand_next): Update.
13587
13588 2018-02-08  Tom Tromey  <tom@tromey.com>
13589
13590         * symtab.c (default_collect_symbol_completion_matches_break_on):
13591         Use unique_xmalloc_ptr.
13592         * macroscope.h: (sal_macro_scope, user_macro_scope)
13593         (default_macro_scope): Return unique_xmalloc_ptr.
13594         * macroscope.c (sal_macro_scope, user_macro_scope)
13595         (default_macro_scope): Return unique_xmalloc_ptr.
13596         * macroexp.h (macro_expand, macro_expand_once): Return
13597         unique_xmalloc_ptr.
13598         * macroexp.c (macro_expand, macro_expand_once): Return
13599         unique_xmalloc_ptr.
13600         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13601         (info_macro_command, info_macros_command): Use
13602         unique_xmalloc_ptr.
13603         * compile/compile-c-support.c (write_macro_definitions): Use
13604         unique_xmalloc_ptr.
13605         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13606
13607 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13608
13609         * value.c (value_static_field): Assign field type instead of
13610         containing type when returning an optimized out value.
13611
13612 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13613
13614         * ft32-tdep.c (ft32_read_pc): Remove.
13615         (ft32_write_pc): Remove.
13616         (ft32_gdbarch_init): Update.
13617         * m32r-tdep.c (m32r_read_pc): Remove.
13618         (m32r_gdbarch_init): Update.
13619         * mep-tdep.c (mep_read_pc): Remove.
13620         (mep_gdbarch_init): Update.
13621         * microblaze-tdep.c (microblaze_write_pc): Remove.
13622         (microblaze_gdbarch_init): Update.
13623         * mn10300-tdep.c (mn10300_read_pc): Remove.
13624         (mn10300_write_pc): Remove.
13625         (mn10300_gdbarch_init): Update.
13626         * moxie-tdep.c (moxie_read_pc): Remove.
13627         (moxie_write_pc): Remove.
13628         (moxie_gdbarch_init): Update.
13629
13630 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13631
13632         * expprint.c (print_subexp_standard): Handle
13633         OP_F77_UNDETERMINED_ARGLIST.
13634         (dump_subexp_body_standard): Likewise.
13635
13636 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13637
13638         * target-descriptions.c (tdesc_element_visitor) Add empty
13639         implementations.
13640         (tdesc_type): Move make_gdb_type from here.
13641         (tdesc_type_builtin): Likewise.
13642         (tdesc_type_vector): Likewise.
13643         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13644         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13645         (make_gdb_type_union): Likewise.
13646         (make_gdb_type_flags): Likewise.
13647         (make_gdb_type_enum): Likewise.
13648         (make_gdb_type): New function.
13649         (tdesc_register_type): Use static make_gdb_type.
13650
13651 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13652
13653         * infcmd.c (default_print_one_register_info): Align natural-format
13654         column values consistently one under another.
13655         (pad_to_column): New function.
13656
13657 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13658
13659         * dwarf2read.c (dwarf2_physname): Move commment.
13660
13661 2018-02-01  Leszek Swirski  <leszeks@google.com>
13662
13663         * varobj.c (varobj_formatted_print_options): Allow recursive
13664         pretty printing if pretty printing is enabled.
13665
13666 2018-02-01  Leszek Swirski  <leszeks@google.com>
13667
13668         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13669         names after a structop as a filename.
13670
13671 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13672
13673         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13674         (arm_record_coproc_data_proc): Likewise.
13675
13676 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13677
13678         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13679
13680 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13681
13682         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13683         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13684
13685 2018-01-31  Pedro Alves  <palves@redhat.com>
13686
13687         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13688         * inflow.c (child_terminal_save_inferior): Wrap reference to
13689         tcgetpgrp in HAVE_TERMIOS_H.
13690         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13691         _WIN32.
13692         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13693         always iterate over all inferiors.
13694         (gdbsim_cntrl_c): Adjust.
13695         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13696
13697 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13698
13699         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13700         index type is objfile-owned if the element type is as well.
13701
13702 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13703
13704         GDB 8.1 released.
13705
13706 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13707
13708         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13709         "features/s390x-linux64.c".
13710         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13711         s390_linux32 and s390x_linux64.
13712         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13713         default tdesc.
13714         * s390-tdep.c: Include "features/s390-linux32.c" and
13715         "features/s390x-linux64.c".
13716         (s390_tdesc_valid): Add check for tdesc_has_registers.
13717         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13718         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13719         tdesc_s390x_linux64.
13720         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13721         tdesc_s390x_linux64 to...
13722         * s390-tdep.h: ...here.
13723
13724 2018-01-30  Pedro Alves  <palves@redhat.com>
13725
13726         PR gdb/13211
13727         * config.in, configure: Regenerate.
13728         * configure.ac: Check for getpgid.
13729         * go32-nat.c (go32_pass_ctrlc): New.
13730         (go32_target): Install it.
13731         * inf-child.c (inf_child_target): Install
13732         child_terminal_save_inferior, child_pass_ctrlc and
13733         child_interrupt.
13734         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13735         (inf_ptrace_target): No longer install it.
13736         * infcmd.c (interrupt_target_1): Adjust.
13737         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13738         (child_interrupt): Declare.
13739         (inferior::terminal_state): New.
13740         * inflow.c (struct terminal_info): Update comments.
13741         (inferior_process_group): Delete.
13742         (terminal_is_ours): Delete.
13743         (gdb_tty_state): New.
13744         (child_terminal_init): Adjust.
13745         (is_gdb_terminal, sharing_input_terminal_1)
13746         (sharing_input_terminal): New functions.
13747         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13748         Set the process's actual process group in the foreground if
13749         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13750         mark terminal as the inferior's if not sharing GDB's terminal.
13751         Don't check attach_flag.
13752         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13753         pass down a target_terminal_state.
13754         (child_terminal_save_inferior): New, factored out from ...
13755         (child_terminal_ours_1): ... this.  Handle
13756         target_terminal_state::is_ours_for_output.
13757         (child_interrupt, child_pass_ctrlc): New.
13758         (inflow_inferior_exit): Clear the inferior's terminal_state.
13759         (copy_terminal_info): Copy the inferior's terminal state.
13760         (_initialize_inflow): Remove reference to terminal_is_ours.
13761         * inflow.h (inferior_process_group): Delete.
13762         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13763         * procfs.c (procfs_target): Don't install procfs_interrupt.
13764         (procfs_interrupt): Delete.
13765         * remote.c (remote_serial_quit_handler): Adjust.
13766         (remote_interrupt): Remove ptid parameter.  Adjust.
13767         * target-delegates.c: Regenerate.
13768         * target.c: Include "terminal.h".
13769         (target_terminal::terminal_state): Rename to ...
13770         (target_terminal::m_terminal_state): ... this.
13771         (target_terminal::init): Adjust.
13772         (target_terminal::inferior): Adjust to per-inferior
13773         terminal_state.
13774         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13775         (target_terminal::ours, target_terminal::ours_for_output): Use
13776         target_terminal_is_ours_kind.
13777         (target_interrupt): Remove ptid parameter.  Adjust.
13778         (default_target_pass_ctrlc): Adjust.
13779         * target.h (target_ops::to_terminal_save_inferior): New field.
13780         (target_ops::to_interrupt): Remove ptid_t parameter.
13781         (target_interrupt): Remove ptid_t parameter.  Update comment.
13782         (target_pass_ctrlc): Update comment.
13783         * target/target.h (target_terminal_state): New scoped enum,
13784         factored out of ...
13785         (target_terminal::terminal_state): ... here.
13786         (target_terminal::inferior): Update comments.
13787         (target_terminal::restore_inferior): New.
13788         (target_terminal::is_inferior, target_terminal::is_ours)
13789         (target_terminal::is_ours_for_output): Adjust.
13790         (target_terminal::scoped_restore_terminal_state): Adjust to
13791         rename, and call restore_inferior() instead of inferior().
13792         (target_terminal::scoped_restore_terminal_state::m_state): Change
13793         type.
13794         (target_terminal::terminal_state): Rename to ...
13795         (target_terminal::m_terminal_state): ... this and change type.
13796
13797 2018-01-30  Pedro Alves  <palves@redhat.com>
13798
13799         * linux-nat.c (wait_for_signal): New function.
13800         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13801         directly.
13802         (async_terminal_is_ours)
13803         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13804         (linux_nat_add_target): Don't override
13805         to_terminal_inferior/to_terminal_ours.
13806
13807 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13808
13809         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13810
13811 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13812
13813         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13814         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13815         dwarf2_per_objfile_free here.
13816         (dwarf2_per_objfile_free): Remove.
13817         (_initialize_dwarf2_read): Don't register
13818         dwarf2_per_objfile_free as a registry cleanup.
13819
13820 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13821
13822         Avoid compilation errors in MinGW native builds
13823
13824         The error is triggered by including python-internal.h, and the
13825         error message is:
13826
13827              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13828                       from build-gnulib/import/math.h:27,
13829                       from d:/usr/Python26/include/pyport.h:235,
13830                       from d:/usr/Python26/include/Python.h:58,
13831                       from python/python-internal.h:94,
13832                       from python/py-arch.c:24:
13833              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13834         using ::hypot;
13835                 ^~~~~
13836
13837         This happens because Python headers define 'hypot' to expand t
13838         '_hypot' in the Windows builds.
13839         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13840         'hypoth'.  This avoids a compilation error.
13841
13842 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13843
13844         * MAINTAINERS (Write After Approval): Fix ordering.
13845
13846 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13847
13848         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13849
13850 2018-01-26  Alan Modra  <amodra@gmail.com>
13851
13852         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13853         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13854         Remove nop.  Make const.  Comment.
13855         (powerpc32_plt_stub_so_2): New.
13856         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13857         Correct count.  Update uses.
13858         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13859         Move common code reading PLT entry word.  Correct
13860         powerpc32_plt_stub PLT address calculation.
13861         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13862         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13863         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13864         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13865         (ppc64_standard_linkage8): Likewise.
13866         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13867         Correct insns description.
13868         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13869
13870 2018-01-24  Pedro Alves  <palves@redhat.com>
13871
13872         GCC PR libstdc++/83906
13873         * gdbtypes.c (operator==(const dynamic_prop &,
13874         const dynamic_prop &)): New.
13875         (operator==(const range_bounds &, const range_bounds &)): New.
13876         (check_types_equal): Use them instead of memcmp.
13877         * gdbtypes.h (operator==(const dynamic_prop &,
13878         const dynamic_prop &)): Declare.
13879         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13880         (operator==(const range_bounds &, const range_bounds &)): Declare.
13881         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13882
13883 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13884
13885         * s390-linux-tdep.c (s390_record_address_mask)
13886         (s390_record_calc_disp_common, s390_record_calc_disp)
13887         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13888         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13889         (s390_process_record): Move to s390-tdep.c.
13890         (s390_linux_init_abi_any): Adjust.
13891         * s390-tdep.c (s390_record_address_mask)
13892         (s390_record_calc_disp_common, s390_record_calc_disp)
13893         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13894         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13895         (s390_process_record): Moved from s390-linux-tdep.c
13896         (s390_gdbarch_init): Adjust.
13897
13898 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13899
13900         * s390-linux-nat.c (s390-tdep.h): New include.
13901         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13902         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13903         (ALLDEPFILES): Add s390-tdep.c.
13904         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13905         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13906         * s390-tdep.h: ...this.  New file.
13907         * s390-linux-tdep.c (s390-tdep.h): New include.
13908         (_initialize_s390_tdep): Rename to...
13909         (_initialize_s390_linux_tdep): ...this and adjust.
13910         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13911         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13912         s390-tdep.h.
13913         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13914         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13915         (s390_is_partial_instruction, s390_software_single_step)
13916         (is_non_branch_ril, s390_displaced_step_copy_insn)
13917         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13918         (s390_prologue_data, s390_addr, s390_store, s390_load)
13919         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13920         (s390_register_call_saved, s390_guess_tracepoint_registers)
13921         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13922         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13923         (s390_pseudo_register_name, s390_pseudo_register_type)
13924         (s390_pseudo_register_read, s390_pseudo_register_write)
13925         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13926         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13927         (s390_addr_bits_remove, s390_address_class_type_flags)
13928         (s390_address_class_type_flags_to_name)
13929         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13930         (s390_function_arg_float, s390_function_arg_vector)
13931         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13932         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13933         (s390_frame_align, s390_register_return_value, s390_return_value)
13934         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13935         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13936         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13937         (s390_trad_frame_prev_register, s390_unwind_cache)
13938         (s390_prologue_frame_unwind_cache)
13939         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13940         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13941         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13942         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13943         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13944         (s390_frame_base_address, s390_local_base_address)
13945         (s390_frame_base, s390_gcc_target_options)
13946         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13947         (s390_validate_reg_range, s390_tdesc_valid)
13948         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13949         * s390-tdep.c: ...this.  New file.
13950
13951 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13952
13953         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13954         (s390_process_record, s390_gdbarch_tdep_alloc)
13955         (s390_linux_init_abi_any): Use/set new hook.
13956
13957 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13958
13959         * s390-linux-tdep.c (osabi.h): New include.
13960         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13961         (s390_linux_init_abi_any): New functions.
13962         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13963
13964 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13965
13966         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13967         tdesc_has_registers check
13968
13969 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13970
13971         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13972         (s390_validate_reg_range): New macro.
13973         (s390_gdbarch_init): Adjust.
13974
13975 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13976
13977         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13978         (s390_gdbarch_tdep_alloc): Adjust.
13979         (s390_gdbarch_init): Adjust.
13980
13981 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13982
13983         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13984         <have_tdb>: Change type to bool.
13985         (s390_gdbarch_tdep_alloc): Adjust.
13986         (s390_gdbarch_init): Adjust.
13987
13988 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13989
13990         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13991         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13992         (s390_gdbarch_tdep_alloc): New function.
13993         (s390_gdbarch_init): Allocate tdep at start and use its fields
13994         instead of separate variables.
13995
13996 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13997
13998         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13999         when looking for cached gdbarch and add comment for remaining.
14000
14001 2018-01-22  Pedro Alves  <palves@redhat.com>
14002             Sergio Durigan Junior  <sergiodj@redhat.com>
14003
14004         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14005         case.
14006
14007 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14008
14009         * MAINTAINERS: Update my company e-mail address.
14010
14011 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14012
14013         * regcache.c (cooked_write_test): New function.
14014         (_initialize_regcache): Register the test.
14015
14016 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14017
14018         * ia64-tdep.c (ia64_pseudo_register_read): Call
14019         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14020         * m32c-tdep.c (m32c_cat_read): Likewise.
14021         (m32c_r3r2r1r0_read): Likewise.
14022         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14023         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14024
14025 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14026
14027         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14028         method raw_read instead of regcache_raw_read.
14029         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14030         * arm-tdep.c (arm_neon_quad_read): Likewise.
14031         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14032         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14033         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14034         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14035         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14036         (i386_pseudo_register_read_into_value): Likewise.
14037         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14038         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14039         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14040         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14041         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14042         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14043         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14044         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14045         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14046
14047 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14048
14049         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14050         * configure.tgt: Remove target mt.
14051         * mt-tdep.c: Remove.
14052         * regcache.c (cooked_read_test): Remove the check for mt.
14053
14054 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14055
14056         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14057         instead of gdbarch_pseudo_register_read_value.
14058
14059 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14060
14061         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14062         language is Ada.
14063
14064 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14065
14066         * linespec.c (create_sals_line_offset): Remove code that preserved
14067         the symtab_and_line's line number.
14068
14069 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14070
14071         * varobj.c (varobj_create): Don't set valid_block when creating a
14072         floating varobj.
14073
14074 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14075
14076         * varobj.c (varobj_create): Remove out of date comment.
14077
14078 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14079
14080         PR mi/20395
14081         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14082         updating innermost block.
14083         * parse.c (innermost_block_tracker::update): Take extra type
14084         parameter, and check types match before updating innermost block.
14085         (write_dollar_variable): Update innermost block for registers.
14086         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14087         (innermost_block_tracker::innermost_block_tracker): Initialise
14088         m_types member.
14089         (innermost_block_tracker::reset): Take type parameter.
14090         (innermost_block_tracker::update): Take type parameter, and pass
14091         type through as needed.
14092         (innermost_block_tracker::m_types): New member.
14093         * varobj.c (varobj_create): Pass type when reseting innermost
14094         block.
14095
14096 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14097
14098         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14099         * ada-lang.c (resolve_subexp): Likewise.
14100         * breakpoint.c (set_breakpoint_condition) Likewise.
14101         (watch_command_1) Likewise.
14102         * c-exp.y (variable): Likewise.
14103         * d-exp.y (PrimaryExpression): Likewise.
14104         * f-exp.y (variable): Likewise.
14105         * go-exp.y (variable): Likewise.
14106         * m2-exp.y (variable): Likewise.
14107         * objfiles.c (objfile::~objfile): Likewise.
14108         * p-exp.y (variable): Likewise.
14109         * parse.c (innermost_block): Change type.
14110         * parser-defs.h (class innermost_block_tracker): New.
14111         (innermost_block): Change to innermost_block_tracker.
14112         * printcmd.c (display_command): Switch to innermost_block API.
14113         (do_one_display): Likewise.
14114         * rust-exp.y (do_one_display): Likewise.
14115         * symfile.c (clear_symtab_users): Likewise.
14116         * varobj.c (varobj_create): Switch to innermost_block API, replace
14117         use of innermost_block with block stored on varobj object.
14118
14119 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14120
14121         * expression.h (innermost_block): Remove declaration.
14122         * varobj.c: Add 'parser-defs.h' include.
14123
14124 2018-01-19  Tom Tromey  <tom@tromey.com>
14125
14126         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14127         symbols in the static and global blocks.
14128
14129 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14130
14131         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14132         gdb_ptrace.h, and move including gdb_wait.h ...
14133         * nat/linux-ptrace.h: ... to here.
14134
14135 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14136
14137         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14138         inf_ptrace_detach_success.
14139         (inf_ptrace_detach_success): Add inferior parameter, use it
14140         instead of inferior_ptid, pass it to detach_inferior.
14141         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14142         parameter.
14143         * inferior.c (detach_inferior): Add overload that takes an
14144         inferior object.
14145         * inferior.h (detach_inferior): Likewise.
14146         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14147         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14148         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14149
14150 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14151
14152         * target.h (struct target_ops) <to_detach>: Add inferior
14153         parameter.
14154         (target_detach): Likewise.
14155         * target.c (dispose_inferior): Pass inferior down.
14156         (target_detach): Pass inferior down.  Assert that it is equal to
14157         the current inferior.
14158         * aix-thread.c (aix_thread_detach): Pass inferior down.
14159         * corefile.c (core_file_command): Pass current_inferior() down.
14160         * corelow.c (core_detach): Add inferior parameter.
14161         * darwin-nat.c (darwin_detach): Likewise.
14162         * gnu-nat.c (gnu_detach): Likewise.
14163         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14164         * infcmd.c (detach_command): Pass current_inferior() down to
14165         target_detach.
14166         * infrun.c (follow_fork_inferior): Pass parent_inf to
14167         target_detach.
14168         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14169         target_detach.
14170         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14171         * linux-thread-db.c (thread_db_detach): Likewise.
14172         * nto-procfs.c (procfs_detach): Likewise.
14173         * procfs.c (procfs_detach): Likewise.
14174         * record.c (record_detach): Likewise.
14175         * record.h (struct inferior): Forward-declare.
14176         (record_detach): Add inferior parameter.
14177         * remote-sim.c (gdbsim_detach): Likewise.
14178         * remote.c (remote_detach_1): Likewise.
14179         (remote_detach): Likewise.
14180         (extended_remote_detach): Likewise.
14181         * sol-thread.c (sol_thread_detach): Likewise.
14182         * target-debug.h (target_debug_print_inferior_p): New macro.
14183         * target-delegates.c: Re-generate.
14184         * top.c (kill_or_detach): Pass inferior down to target_detach.
14185         * windows-nat.c (windows_detach): Add inferior parameter.
14186
14187 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14188
14189         * target.h (struct target_ops) <to_detach>: Remove args
14190         parameter.
14191         (target_detach): Likewise.
14192         * target.c (dispose_inferior): Adjust.
14193         (target_detach): Remove args parameter, adjust.
14194         * aix-thread.c (aix_thread_detach): Adjust.
14195         * corefile.c (core_file_command): Adjust.
14196         * corelow.c (core_detach): Adjust.
14197         * darwin-nat.c (darwin_detach): Adjust.
14198         * gnu-nat.c (gnu_detach): Adjust.
14199         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14200         * infcmd.c (detach_command): Adjust
14201         * infrun.c (follow_fork_inferior): Adjust.
14202         (handle_vfork_child_exec_or_exit): Adjust.
14203         * linux-fork.c (linux_fork_detach): Remove args parameter.
14204         * linux-fork.h (linux_fork_detach): Likewise.
14205         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14206         * linux-thread-db.c (thread_db_detach): Likewise.
14207         * nto-procfs.c (procfs_detach): Likewise.
14208         * procfs.c (procfs_detach): Likewise.
14209         (do_detach): Remove signo parameter.
14210         * record.c (record_detach): Remove args parameter.
14211         * record.h (record_detach): Likewise.
14212         * remote-sim.c (gdbsim_detach): Likewise.
14213         * remote.c (remote_detach_1): Likewise.
14214         (remote_detach): Likewise.
14215         (extended_remote_detach): Likewise.
14216         * sol-thread.c (sol_thread_detach): Likewise.
14217         * target-delegates.c: Re-generate.
14218         * top.c (struct qt_args) <args>: Remove field.
14219         (kill_or_detach): Don't pass args.
14220         (quit_force): Don't set args.
14221         * windows-nat.c (windows_detach): Remove args parameter.
14222
14223 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14224
14225         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14226         (arm_linux_init_abi): Install it.
14227
14228 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14229
14230         * osabi.c (gdb_osabi_names): Extend the regexp for
14231         arm-linux-gnueabihf.
14232
14233 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14234
14235         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14236         m_abbrevs.
14237         (abbrev_table::add_abbrev): Update.
14238         (abbrev_table::lookup_abbrev): Update.
14239
14240 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14241
14242         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14243
14244 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14245
14246         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14247         to "std::string".
14248
14249 2018-01-17  Tom Tromey  <tom@tromey.com>
14250
14251         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14252
14253 2018-01-17  Tom Tromey  <tom@tromey.com>
14254
14255         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14256         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14257         (create_array_type_with_stride): Update.
14258         * dwarf2read.c (set_die_type): Update.
14259
14260 2018-01-17  Tom Tromey  <tom@tromey.com>
14261
14262         * dwarf2read.c (delayed_method_info): Remove typedef.
14263         (dwarf2_cu::method_info): Now a std::vector.
14264         (add_to_method_list): Update.
14265         (free_delayed_list): Remove.
14266         (compute_delayed_physnames): Update.
14267         (process_full_comp_unit, process_full_type_unit): Clear the method
14268         list.  Remove cleanups.
14269         (psymtab_include_file_name): Add name_holder parameter.  Use
14270         unique_xmalloc_ptr.
14271         (dwarf_decode_lines): Update.
14272
14273 2018-01-17  Tom Tromey  <tom@tromey.com>
14274             Simon Marchi  <simon.marchi@ericsson.com>
14275
14276         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14277         (dwarf2_per_objfile::free_cached_comp_units)
14278         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14279         (init_cutu_and_read_dies_no_follow): Update.
14280         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14281         (dwarf2_cu::~dwarf2_cu): New.
14282         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14283         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14284
14285 2018-01-17  Tom Tromey  <tom@tromey.com>
14286             Simon Marchi  <simon.marchi@ericsson.com>
14287
14288         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14289         (struct die_reader_specs) <abbrev_table>: New member.
14290         (struct abbrev_table): Add constructor.
14291         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14292         <abbrev_obstack>: Now an auto_obstack.
14293         (abbrev_table_up): New typedef.
14294         (init_cu_die_reader): Add abbrev_table parameter.
14295         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14296         Add result_dwo_abbrev_table.
14297         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14298         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14299         Update.
14300         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14301         parameter.
14302         (skip_children): Update.
14303         (abbrev_table::alloc_abbrev): Rename from
14304         abbrev_table_alloc_abbrev.
14305         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14306         (abbrev_table::lookup_abbrev): Rename from
14307         abbrev_table_lookup_abbrev.
14308         (abbrev_table_read_table): Return abbrev_table_up.
14309         (abbrev_table_free, abbrev_table_free_cleanup)
14310         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14311         (load_partial_dies): Update.
14312
14313 2018-01-17  Tom Tromey  <tom@tromey.com>
14314
14315         * dwarf2read.c (dwarf2_compute_name): Update comment.
14316         (read_func_scope, read_variable): Update.
14317         (new_symbol): Remove.
14318         (new_symbol_full): Rename to new_symbol.
14319
14320 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14321
14322         PR gdb/16577
14323         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14324         a warning instead of throwing an error, set section size to 0 and return
14325         NULL.
14326         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14327
14328 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14329
14330         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14331         std::string.
14332         (linux_ptrace_attach_fail_reason_string): Likewise.
14333         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14334         Likewise.
14335         (linux_ptrace_attach_fail_reason_string): Likewise.
14336         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14337
14338 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14339
14340         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14341
14342 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14343
14344         PR gdb/21559
14345         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14346         checking for fs_base/gs_base fields in struct user_regs_struct.
14347         * configure: Regenerate.
14348
14349 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14350
14351         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14352         function.
14353         (aarch64_linux_init_abi): Install it to gdbarch hook
14354         gcc_target_options.
14355
14356 2018-01-15  Pedro Alves  <palves@redhat.com>
14357
14358         * common/signals-state-save-restore.c
14359         (save_original_signals_state): Fix typos.
14360
14361 2017-01-12  Tom Tromey  <tom@tromey.com>
14362             Sergio Durigan Junior  <sergiodj@redhat.com>
14363
14364         * Makefile.in (install-only): Install gdb-add-index.
14365
14366 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14367
14368         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14369
14370 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14371
14372         * infrun.c (keep_going_pass_signal): Clear step-over info when
14373         insert_breakpoints fails.
14374
14375 2018-01-11  Pedro Alves  <palves@redhat.com>
14376
14377         PR gdb/22583
14378         * infrun.c (resume): Rename to ...
14379         (resume_1): ... this.
14380         (resume): Reimplement as wrapper around resume_1.
14381
14382 2018-01-11  Pedro Alves  <palves@redhat.com>
14383
14384         PR remote/22597
14385         * remote.c (remote_parse_stop_reply): Default to the last-set
14386         general thread instead of to 'magic_null_ptid'.
14387
14388 2018-01-10  Pedro Alves  <palves@redhat.com>
14389
14390         * language.h (language_get_symbol_name_matcher): Rename ...
14391         (get_symbol_name_matcher): ... this.
14392         * language.c (language_get_symbol_name_matcher): Ditto.
14393         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14394         callers adjusted.
14395
14396 2018-01-10  Pedro Alves  <palves@redhat.com>
14397
14398         PR gdb/22670
14399         * dwarf2read.c
14400         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14401         Adjust to use language_get_symbol_name_matcher instead of
14402         language_defn::la_get_symbol_name_matcher.
14403         * language.c (language_get_symbol_name_matcher): If in Ada mode
14404         and the lookup name is a verbatim match, return Ada's matcher.
14405         * language.h (language_get_symbol_name_matcher): Adjust comment.
14406         (ada_lookup_name_info::verbatim_p):: New method.
14407
14408 2018-01-10  Pedro Alves  <palves@redhat.com>
14409
14410         PR gdb/22670
14411         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14412         minsym's language is language_auto or language_cplus, pass down
14413         language_ada instead.
14414         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14415
14416 2018-01-10  Pedro Alves  <palves@redhat.com>
14417
14418         PR gdb/22670
14419         * minsyms.c (linkage_name_str): New function.
14420         (iterate_over_minimal_symbols): Use it.
14421
14422 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14423
14424         * NEWS: Document that 'info proc' now works on FreeBSD.
14425
14426 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14427
14428         * configure.ac: Check for kinfo_getfile in libutil.
14429         * configure: Regenerate.
14430         * config.in: Regenerate.
14431         * fbsd-nat.c: Include "fbsd-tdep.h".
14432         (fbsd_fetch_cmdline): New.
14433         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14434         rather than calling error.
14435         (fbsd_info_proc): New.
14436         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14437         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14438         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14439
14440 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14441
14442         * fbsd-nat.c (struct free_deleter): Remove.
14443         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14444
14445 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14446
14447         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14448         NULL for an empty pathname.
14449
14450 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14451
14452         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14453         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14454         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14455         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14456         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14457         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14458         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14459         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14460         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14461         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14462         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14463         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14464         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14465         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14466         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14467
14468 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14469
14470         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14471         (gnu_xfer_auxv): New function.
14472         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14473         TARGET_OBJECT_AUXV.
14474
14475 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14476             Simon Marchi  <simon.marchi@ericsson.com>
14477
14478         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14479         common/selftest.c.
14480         (COMMON_OBS): Remove selftest.o.
14481         * configure.ac: Append selftest-arch.c and common/selftest.c to
14482         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14483         * configure: Re-generated.
14484         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14485         GDB_SELF_TEST.
14486         (maintenance_info_selftests): Likewise.
14487
14488 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14489
14490         * ada-valprint.c (val_print_packed_array_elements): Use
14491         proper number of elements when printing an array indexed
14492         by an enumeration type.
14493
14494 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14495
14496         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14497         (dw2_get_file_names_reader): Adjust.
14498         (lookup_dwo_signatured_type): Adjust.
14499         (lookup_dwp_signatured_type): Adjust.
14500         (lookup_signatured_type): Adjust.
14501         (create_type_unit_group): Adjust.
14502         (get_type_unit_group): Adjust.
14503         (process_psymtab_comp_unit_reader): Adjust.
14504         (build_type_psymtabs_reader): Adjust.
14505         (scan_partial_symbols): Adjust.
14506         (add_partial_symbol): Adjust.
14507         (add_partial_subprogram): Adjust.
14508         (peek_die_abbrev): Adjust.
14509         (fixup_go_packaging): Adjust.
14510         (process_imported_unit_die): Adjust.
14511         (dwarf2_compute_name): Adjust.
14512         (dwarf2_physname): Adjust.
14513         (read_import_statement): Adjust.
14514         (handle_DW_AT_stmt_list): Adjust.
14515         (read_file_scope): Adjust.
14516         (read_func_scope): Adjust.
14517         (read_lexical_block_scope): Adjust.
14518         (read_call_site_scope): Adjust.
14519         (read_variable): Adjust.
14520         (dwarf2_rnglists_process): Adjust.
14521         (dwarf2_ranges_process): Adjust.
14522         (dwarf2_ranges_read): Adjust.
14523         (dwarf2_get_pc_bounds): Adjust.
14524         (dwarf2_record_block_ranges): Adjust.
14525         (dwarf2_add_field): Adjust.
14526         (dwarf2_add_member_fn): Adjust.
14527         (read_structure_type): Adjust.
14528         (process_structure_scope): Adjust.
14529         (read_enumeration_type): Adjust.
14530         (read_array_type): Adjust.
14531         (mark_common_block_symbol_computed): Adjust.
14532         (read_common_block): Adjust.
14533         (read_namespace_type): Adjust.
14534         (read_namespace): Adjust.
14535         (read_module_type): Adjust.
14536         (read_tag_pointer_type): Adjust.
14537         (read_tag_ptr_to_member_type): Adjust.
14538         (read_tag_string_type): Adjust.
14539         (read_subroutine_type): Adjust.
14540         (read_typedef): Adjust.
14541         (read_base_type): Adjust.
14542         (attr_to_dynamic_prop): Adjust.
14543         (read_subrange_type): Adjust.
14544         (read_unspecified_type): Adjust.
14545         (dwarf2_read_abbrevs): Adjust.
14546         (load_partial_dies): Adjust.
14547         (read_partial_die): Adjust.
14548         (find_partial_die): Adjust.
14549         (guess_partial_die_structure_name): Adjust.
14550         (fixup_partial_die): Adjust.
14551         (read_attribute_value): Adjust.
14552         (read_addr_index): Adjust.
14553         (read_addr_index_from_leb128): Adjust.
14554         (read_str_index): Adjust.
14555         (dwarf2_string_attr): Adjust.
14556         (get_debug_line_section): Adjust.
14557         (dwarf_decode_line_header): Adjust.
14558         (lnp_state_machine::check_line_address): Adjust.
14559         (dwarf_decode_lines_1): Adjust.
14560         (dwarf_decode_lines): Adjust.
14561         (dwarf2_start_symtab): Adjust.
14562         (var_decode_location): Adjust.
14563         (new_symbol_full): Adjust.
14564         (dwarf2_const_value_data): Adjust.
14565         (dwarf2_const_value_attr): Adjust.
14566         (dwarf2_const_value): Adjust.
14567         (die_type): Adjust.
14568         (die_containing_type): Adjust.
14569         (build_error_marker_type): Adjust.
14570         (lookup_die_type): Adjust.
14571         (guess_full_die_structure_name): Adjust.
14572         (anonymous_struct_prefix): Adjust.
14573         (determine_prefix): Adjust.
14574         (dwarf2_name): Adjust.
14575         (follow_die_ref_or_sig): Adjust.
14576         (follow_die_offset): Adjust.
14577         (follow_die_ref): Adjust.
14578         (follow_die_sig_1): Adjust.
14579         (follow_die_sig): Adjust.
14580         (get_signatured_type): Adjust.
14581         (get_DW_AT_signature_type): Adjust.
14582         (decode_locdesc): Adjust.
14583         (dwarf_decode_macros): Adjust.
14584         (cu_debug_loc_section): Adjust.
14585         (fill_in_loclist_baton): Adjust.
14586         (dwarf2_symbol_mark_computed): Adjust.
14587         (init_one_comp_unit): Don't assign
14588         dwarf2_cu::dwarf2_per_objfile.
14589         (set_die_type): Adjust.
14590
14591 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14592
14593         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14594         <dwarf2_per_objfile>: New field.
14595         (dwarf2_per_objfile): Remove global.
14596         (get_dwarf2_per_objfile): New function.
14597         (set_dwarf2_per_objfile): New function.
14598         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14599         dwarf2_per_objfile.
14600         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14601         (read_abbrev_offset): Likewise.
14602         (read_indirect_string): Likewise.
14603         (read_indirect_line_string): Likewise.
14604         (read_indirect_string_at_offset): Likewise.
14605         (read_indirect_string_from_dwz): Likewise.
14606         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14607         dwarf2_per_objfile.
14608         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14609         (create_all_comp_units): Change objfile parameter to
14610         dwarf2_per_objfile.
14611         (create_all_type_units): Likewise.
14612         (process_queue): Add dwarf2_per_objfile parameter.
14613         (read_and_check_comp_unit_head): Likewise.
14614         (lookup_dwo_unit_in_dwp): Likewise.
14615         (get_dwp_file): Likewise.
14616         (process_cu_includes): Likewise.
14617         (struct free_dwo_file_cleanup_data): New struct.
14618         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14619         set_dwarf2_per_objfile.
14620         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14621         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14622         context, adjust calls.
14623         (dw2_instantiate_symtab): Likewise.
14624         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14625         (dw2_get_cu): Likewise.
14626         (create_cu_from_index_list): Change objfile parameter to
14627         dwarf2_per_objfile.
14628         (create_cus_from_index_list): Get dwarf2_per_objfile from
14629         context, adjust calls.
14630         (create_cus_from_index): Likewise.
14631         (create_signatured_type_table_from_index): Change objfile
14632         parameter to dwarf2_per_objfile.
14633         (create_signatured_type_table_from_debug_names): Change objfile
14634         parameter to dwarf2_per_objfile.
14635         (create_addrmap_from_index): Likewise.
14636         (create_addrmap_from_aranges): Likewise.
14637         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14638         (dw2_setup): Remove.
14639         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14640         context.
14641         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14642         get_dwarf2_per_objfile.
14643         (dw2_forget_cached_source_info): Likewise.
14644         (dw2_map_symtabs_matching_filename): Likewise.
14645         (struct dw2_symtab_iterator) <index>: Remove.
14646         <dwarf2_per_objfile>: New field.
14647         (dw2_symtab_iter_init): Replace index parameter with
14648         dwarf2_per_objfile.
14649         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14650         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14651         (dw2_print_stats): Likewise.
14652         (dw2_dump): Likewise.
14653         (dw2_expand_symtabs_for_function): Likewise.
14654         (dw2_expand_all_symtabs): Likewise.
14655         (dw2_expand_symtabs_with_fullname): Likewise.
14656         (dw2_expand_marked_cus): Replace index and objfile parameters
14657         with dwarf2_per_objfile.
14658         (dw_expand_symtabs_matching_file_matcher): Add
14659         dwarf2_per_objfile parameter and adjust calls.
14660         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14661         adjust calls.
14662         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14663         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14664         adjust calls.
14665         (create_cus_from_debug_names_list): Replace objfile parameter
14666         with dwarf2_per_objfile and adjust calls.
14667         (create_cus_from_debug_names): Likewise.
14668         (dwarf2_read_debug_names): Likewise.
14669         (mapped_debug_names::namei_to_name): Adjust call.
14670         (dw2_debug_names_iterator::next): Likewise.
14671         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14672         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14673         (dw2_debug_names_dump): Likewise.
14674         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14675         (dw2_debug_names_expand_symtabs_matching): Likewise.
14676         (dwarf2_initialize_objfile): Likewise.
14677         (dwarf2_build_psymtabs): Likewise.
14678         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14679         this_cu.
14680         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14681         (read_and_check_comp_unit_head): Likewise.
14682         (read_abbrev_offset): Likewise.
14683         (create_debug_type_hash_table): Likewise.
14684         (create_debug_types_hash_table): Likewise.
14685         (create_all_type_units): Replace objfile parameter with
14686         dwarf2_per_objfile.
14687         (add_type_unit): Add dwarf2_per_objfile parameter.
14688         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14689         with dwarf2_per_objfile.
14690         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14691         (lookup_dwp_signatured_type): Likewise.
14692         (lookup_signatured_type): Likewise.
14693         (read_cutu_die_from_dwo): Likewise.
14694         (init_tu_and_read_dwo_dies): Likewise.
14695         (init_cutu_and_read_dies): Likewise.
14696         (init_cutu_and_read_dies_no_follow): Likewise.
14697         (allocate_type_unit_groups_table): Add objfile parameter.
14698         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14699         (get_type_unit_group): Likewise.
14700         (process_psymtab_comp_unit): Update call.
14701         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14702         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14703         (print_tu_stats): Likewise.
14704         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14705         in void* parameter.
14706         (build_type_psymtabs): Change objfile parameter to
14707         dwarf2_per_objfile.
14708         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14709         passed in void* parameter.
14710         (process_skeletonless_type_units): Change objfile parameter to
14711         dwarf2_per_objfile.
14712         (set_partial_user): Likewise.
14713         (dwarf2_build_psymtabs_hard): Likewise.
14714         (read_comp_units_from_section): Likewise.
14715         (create_all_comp_units): Likewise.
14716         (scan_partial_symbols): Update calls.
14717         (add_partial_symbol): Likewise.
14718         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14719         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14720         (process_queue): Add dwarf2_per_objfile parameter.
14721         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14722         (compute_compunit_symtab_includes): Likewise.
14723         (process_cu_includes): Add dwarf2_per_objfile parameter.
14724         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14725         (process_full_type_unit): Likewise.
14726         (process_imported_unit_die): Update call.
14727         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14728         (read_file_scope): Likewise.
14729         (allocate_dwo_file_hash_table): Add objfile parameter.
14730         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14731         (create_cus_hash_table): Likewise.
14732         (create_dwp_hash_table): Likewise.
14733         (create_dwo_unit_in_dwp_v1): Likewise.
14734         (create_dwp_v2_section): Likewise.
14735         (create_dwo_unit_in_dwp_v2): Likewise.
14736         (lookup_dwo_unit_in_dwp): Likewise.
14737         (try_open_dwop_file): Likewise.
14738         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14739         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14740         cleanup to include a reference to dwarf2_per_objfile.
14741         (open_dwp_file): Add dwarf2_per_objfile parameter.
14742         (open_and_init_dwp_file): Likewise.
14743         (get_dwp_file): Likewise.
14744         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14745         (queue_and_load_all_dwo_tus): Update call.
14746         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14747         data.
14748         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14749         (dwarf2_ranges_process): Likewise.
14750         (dwarf2_get_pc_bounds): Likewise.
14751         (mark_common_block_symbol_computed): Likewise.
14752         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14753         (dwarf2_read_abbrevs): Update call.
14754         (read_partial_die): Use dwarf2_per_objfile from cu.
14755         (find_partial_die): Likewise.
14756         (fixup_partial_die): Likewise.
14757         (read_attribute_value): Likewise.
14758         (read_indirect_string_at_offset_from): Add objfile parameter.
14759         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14760         parameter.
14761         (read_indirect_string_from_dwz): Add objfile parameter.
14762         (read_indirect_string): Add objfile parameter.
14763         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14764         (read_addr_index): Use dwarf2_per_objfile from cu.
14765         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14766         call dw2_setup.
14767         (read_str_index): Use dwarf2_per_objfile from cu.
14768         (get_debug_line_section): Likewise.
14769         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14770         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14771         (new_symbol_full): Use dwarf2_per_objfile from cu.
14772         (build_error_marker_type): Likewise.
14773         (lookup_die_type): Likewise.
14774         (determine_prefix): Likewise.
14775         (follow_die_offset): Likewise.
14776         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14777         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14778         (dwarf2_fetch_die_type_sect_off): Likewise.
14779         (dwarf2_get_die_type): Likewise.
14780         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14781         (get_signatured_type): Likewise.
14782         (get_DW_AT_signature_type): Likewise.
14783         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14784         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14785         (cu_debug_loc_section): Likewise.
14786         (fill_in_loclist_baton): Likewise.
14787         (dwarf2_symbol_mark_computed): Likewise.
14788         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14789         dwarf2_per_objfile.
14790         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14791         parameter.
14792         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14793         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14794         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14795         (set_die_type): Use dwarf2_free_objfile from cu.
14796         (get_die_type_at_offset): Likewise.
14797         (dwarf2_per_objfile_free): Don't assign global variable.
14798         (debug_names) <constructor>: Add dwarf2_per_objfile
14799         parameter, update m_debugstrlookup construction.
14800         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14801         parameter.
14802         <m_dwarf2_per_objfile>: New field.
14803         <lookup>: Use m_dwarf2_per_objfile.
14804         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14805         (psyms_seen_size): Likewise.
14806         (write_gdbindex): Replace objfile parameter with
14807         dwarf2_per_objfile.
14808         (write_debug_names): Likewise.
14809         (write_psymtabs_to_index): Likewise.
14810         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14811         calls.
14812
14813 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14814
14815         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14816         <dwarf2_per_objfile>: New field.
14817         (struct dwarf2_per_cu_data) <objfile>: Remove.
14818         <dwarf2_per_objfile>: New field.
14819         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14820         of objfile.
14821         (create_signatured_type_table_from_index): Likewise.
14822         (create_debug_type_hash_table): Likewise.
14823         (fill_in_sig_entry_from_dwo_entry): Likewise.
14824         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14825         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14826         objfile.
14827         (create_partial_symtab): Access objfile through
14828         dwarf2_per_objfile.
14829         (process_psymtab_comp_unit_reader): Likewise.
14830         (read_comp_units_from_section): Likewise.
14831         (scan_partial_symbols): Likewise.
14832         (add_partial_symbol): Likewise.
14833         (add_partial_subprogram): Likewise.
14834         (peek_die_abbrev): Likewise.
14835         (fixup_go_packaging): Likewise.
14836         (process_full_comp_unit): Likewise.
14837         (process_full_type_unit): Likewise.
14838         (process_imported_unit_die): Likewise.
14839         (dwarf2_compute_name): Likewise.
14840         (dwarf2_physname): Likewise.
14841         (read_import_statement): Likewise.
14842         (create_cus_hash_table): Assign dwarf2_physname instead of
14843         objfile.
14844         (read_func_scope): Access objfile through dwarf2_per_objfile.
14845         (read_lexical_block_scope): Likewise.
14846         (read_call_site_scope): Likewise.
14847         (read_variable): Likewise.
14848         (dwarf2_rnglists_process): Likewise.
14849         (dwarf2_ranges_process): Likewise.
14850         (dwarf2_ranges_read): Likewise.
14851         (dwarf2_record_block_ranges): Likewise.
14852         (dwarf2_add_field): Likewise.
14853         (dwarf2_add_member_fn): Likewise.
14854         (read_structure_type): Likewise.
14855         (process_structure_scope): Likewise.
14856         (read_enumeration_type): Likewise.
14857         (read_array_type): Likewise.
14858         (read_common_block): Likewise.
14859         (read_namespace_type): Likewise.
14860         (read_namespace): Likewise.
14861         (read_module_type): Likewise.
14862         (read_tag_pointer_type): Likewise.
14863         (read_tag_ptr_to_member_type): Likewise.
14864         (read_tag_string_type): Likewise.
14865         (read_subroutine_type): Likewise.
14866         (read_typedef): Likewise.
14867         (read_base_type): Likewise.
14868         (attr_to_dynamic_prop): Likewise.
14869         (read_subrange_type): Likewise.
14870         (read_unspecified_type): Likewise.
14871         (load_partial_dies): Likewise.
14872         (read_partial_die): Likewise.
14873         (find_partial_die): Likewise.
14874         (guess_partial_die_structure_name): Likewise.
14875         (fixup_partial_die): Likewise.
14876         (read_attribute_value): Likewise.
14877         (read_addr_index_from_leb128): Likewise.
14878         (dwarf2_read_addr_index): Likewise.
14879         (dwarf2_string_attr): Likewise.
14880         (lnp_state_machine::check_line_address): Likewise.
14881         (dwarf_decode_lines_1): Likewise.
14882         (dwarf_decode_lines): Likewise.
14883         (dwarf2_start_symtab): Likewise.
14884         (var_decode_location): Likewise.
14885         (new_symbol_full): Likewise.
14886         (dwarf2_const_value_data): Likewise.
14887         (dwarf2_const_value_attr): Likewise.
14888         (dwarf2_const_value): Likewise.
14889         (die_type): Likewise.
14890         (die_containing_type): Likewise.
14891         (lookup_die_type): Likewise.
14892         (guess_full_die_structure_name): Likewise.
14893         (anonymous_struct_prefix): Likewise.
14894         (dwarf2_name): Likewise.
14895         (follow_die_ref_or_sig): Likewise.
14896         (follow_die_offset): Likewise.
14897         (follow_die_ref): Likewise.
14898         (dwarf2_fetch_die_loc_sect_off): Likewise.
14899         (dwarf2_fetch_constant_bytes): Likewise.
14900         (dwarf2_fetch_die_type_sect_off): Likewise.
14901         (dwarf2_get_die_type): Likewise.
14902         (follow_die_sig): Likewise.
14903         (decode_locdesc): Likewise.
14904         (dwarf2_per_cu_objfile): Likewise.
14905         (dwarf2_per_cu_text_offset): Likewise.
14906         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14907         objfile.
14908         (set_die_type): Access objfile through
14909         dwarf2_per_objfile.
14910
14911 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14912
14913         * valprint.c (converted_character_d): Remove typedef.
14914         (DEF_VEC_O (converted_character_d)): Remove.
14915         (count_next_character): Use std::vector.
14916         (print_converted_chars_to_obstack): Likewise.
14917         (generic_printstr): Likewise.
14918
14919 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14920
14921         * xml-support.h (struct gdb_xml_value): Add constructor.
14922         <value>: Change type to unique_xmalloc_ptr.
14923         (gdb_xml_value_s): Remove typedef.
14924         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14925         (gdb_xml_element_start_handler): Change parameter type to
14926         std::vector.
14927         (xml_find_attribute): Likewise.
14928         * xml-support.c (xml_find_attribute): Change parameter type to
14929         std::vector and adjust.
14930         (gdb_xml_values_cleanup): Remove.
14931         (gdb_xml_parser::start_element): Adjust to std::vector.
14932         (xinclude_start_include): Change paraeter type to std::vector
14933         and adjust.
14934         * btrace.c (check_xml_btrace_version): Likewise.
14935         (parse_xml_btrace_block): Likewise.
14936         (parse_xml_btrace_pt_config_cpu): Likewise.
14937         (parse_xml_btrace_pt): Likewise.
14938         (parse_xml_btrace_conf_bts): Likewise.
14939         (parse_xml_btrace_conf_pt): Likewise.
14940         * memory-map.c (memory_map_start_memory): Likewise.
14941         (memory_map_start_property): Likewise.
14942         * osdata.c (osdata_start_osdata): Likewise.
14943         (osdata_start_item): Likewise.
14944         (osdata_start_column): Likewise.
14945         * remote.c (start_thread): Likewise.
14946         * solib-aix.c (library_list_start_library): Likewise.
14947         (library_list_start_list): Likewise.
14948         * solib-svr4.c (library_list_start_library): Likewise.
14949         (svr4_library_list_start_list): Likewise.
14950         * solib-target.c (library_list_start_segment): Likewise.
14951         (library_list_start_section): Likewise.
14952         (library_list_start_library): Likewise.
14953         (library_list_start_list): Likewise.
14954         * tracepoint.c (traceframe_info_start_memory): Likewise.
14955         (traceframe_info_start_tvar): Likewise.
14956         * xml-syscall.c (syscall_start_syscall): Likewise.
14957         * xml-tdesc.c (tdesc_start_target): Likewise.
14958         (tdesc_start_feature): Likewise.
14959         (tdesc_start_reg): Likewise.
14960         (tdesc_start_union): Likewise.
14961         (tdesc_start_struct): Likewise.
14962         (tdesc_start_flags): Likewise.
14963         (tdesc_start_enum): Likewise.
14964         (tdesc_start_field): Likewise.
14965         (tdesc_start_enum_value): Likewise.
14966         (tdesc_start_vector): Likewise.
14967
14968 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14969
14970         * extension.h (struct xmethod_worker) <clone>: Remove.
14971         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14972         Remove.
14973         (python_xmethod_worker::clone): Remove.
14974         * valops.c (find_overload_match): Use std::move instead of
14975         clone.
14976
14977 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14978
14979         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14980         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14981         <free_xmethod_worker_data>: Remove.
14982         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14983         <get_xmethod_arg_types>: Remove.
14984         <get_xmethod_result_type>: Remove.
14985         <invoke_xmethod>: Remove.
14986         * extension.c (new_xmethod_worker): Remove.
14987         (clone_xmethod_worker): Remove.
14988         (get_matching_xmethod_workers): Return void, pass std::vector by
14989         pointer.
14990         (get_xmethod_arg_types): Rename to...
14991         (xmethod_worker::get_arg_types): ... this, and adjust.
14992         (get_xmethod_result_type): Rename to...
14993         (xmethod_worker::get_result_type): ... this, and adjust.
14994         (invoke_xmethod): Remove.
14995         (free_xmethod_worker): Remove.
14996         (free_xmethod_worker_vec): Remove.
14997         * extension.h (enum ext_lang_rc): Move here from
14998         extension-priv.h.
14999         (struct xmethod_worker): Add constructor and destructor.
15000         <data>: Remove.
15001         <value>: Remove.
15002         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15003         virtual pure methods.
15004         <get_arg_types, get_result_type>: New methods.
15005         (xmethod_worker_ptr): Remove typedef.
15006         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15007         (xmethod_worker_vec): Remove typedef.
15008         (xmethod_worker_up): New typedef.
15009         (invoke_xmethod): Remove.
15010         (clone_xmethod_worker): Remove.
15011         (free_xmethod_worker): Remove.
15012         (free_xmethod_worker_vec): Remove.
15013         (get_xmethod_arg_types): Remove.
15014         (get_xmethod_result_type): Remove.
15015         * valops.c (find_method_list): Use std::vector, don't use
15016         intermediate vector.
15017         (value_find_oload_method_list): Use std::vector.
15018         (find_overload_match): Use std::vector.
15019         (find_oload_champ): Use std::vector.
15020         * value.c (value_free): Use operator delete.
15021         (value_of_xmethod): Rename to...
15022         (value_from_xmethod): ... this.  Don't assign
15023         xmethod_worker::value, take rvalue-reference.
15024         (result_type_of_xmethod): Adjust.
15025         (call_xmethod): Adjust.
15026         * value.h: Include extension.h.
15027         (struct xmethod_worker): Don't forward-declare.
15028         (value_of_xmethod): Rename to...
15029         (value_from_xmethod): ... this, take rvalue-reference.
15030         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15031         (struct python_xmethod_worker): ... this, add constructor and
15032         destructor.
15033         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15034         (gdbpy_free_xmethod_worker_data): Rename to...
15035         (python_xmethod_worker::~python_xmethod_worker): ... this and
15036         adjust.
15037         (gdbpy_clone_xmethod_worker_data): Rename to...
15038         (python_xmethod_worker::clone): ... this and adjust.
15039         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15040         temporary vector.
15041         (gdbpy_get_xmethod_arg_types): Rename to...
15042         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15043         (gdbpy_get_xmethod_result_type): Rename to...
15044         (python_xmethod_worker::do_get_result_type): ... this and
15045         adjust.
15046         (gdbpy_invoke_xmethod): Rename to...
15047         (python_xmethod_worker::invoke): ... this and adjust.
15048         (new_python_xmethod_worker): Rename to...
15049         (python_xmethod_worker::python_xmethod_worker): ... this and
15050         adjust.
15051         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15052         Remove.
15053         (gdbpy_free_xmethod_worker_data): Remove.
15054         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15055         (gdbpy_get_xmethod_arg_types): Remove.
15056         (gdbpy_get_xmethod_result_type): Remove.
15057         (gdbpy_invoke_xmethod): Remove.
15058         * python/python.c (python_extension_ops): Remove obsolete
15059         callbacks.
15060
15061 2018-01-05  Pedro Alves  <palves@redhat.com>
15062
15063         PR gdb/18653
15064         * common/signals-state-save-restore.c
15065         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15066         find a custom handler preinstalled, instead of internal erroring.
15067         But only warn if !quiet.
15068         * common/signals-state-save-restore.h
15069         (save_original_signals_state): New parameter 'quiet'.
15070         * main.c (captured_main_1): Move save_original_signals_state call
15071         after option handling, and pass QUIET.
15072
15073 2018-01-05  Pedro Alves  <palves@redhat.com>
15074
15075         * spu-tdep.c (spu_catch_start): Pass
15076         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15077
15078 2018-01-05  Pedro Alves  <palves@redhat.com>
15079
15080         PR gdb/22670
15081         * ada-lang.c (literal_symbol_name_matcher): New function.
15082         (ada_get_symbol_name_matcher): Use it for
15083         symbol_name_match_type::SEARCH_NAME.
15084         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15085         it down instead of assuming symbol_name_match_type::FULL.
15086         * block.h (block_lookup_symbol): New parameter 'match_type'.
15087         * c-valprint.c (print_unpacked_pointer): Use
15088         lookup_symbol_search_name instead of lookup_symbol.
15089         * compile/compile-object-load.c (get_out_value_type): Pass down
15090         symbol_name_match_type::SEARCH_NAME.
15091         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15092         symbol_name_match_type::FULL.
15093         * cp-support.c (cp_get_symbol_name_matcher): Handle
15094         symbol_name_match_type::SEARCH_NAME.
15095         * infrun.c (insert_exception_resume_breakpoint): Use
15096         lookup_symbol_search_name.
15097         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15098         * psymtab.c (maintenance_check_psymtabs): Use
15099         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15100         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15101         SYMBOL_SEARCH_NAME.
15102         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15103         if symbol_name_match_type::SEARCH_NAME.
15104         (lookup_symbol_in_language): Pass down
15105         symbol_name_match_type::FULL.
15106         (lookup_symbol_search_name): New.
15107         (lookup_language_this): Pass down
15108         symbol_name_match_type::SEARCH_NAME.
15109         (lookup_symbol_aux, lookup_local_symbol): New parameter
15110         'match_type'.  Pass it down.
15111         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15112         (lookup_symbol_search_name): New declaration.
15113         (lookup_symbol_in_block): New 'match_type' parameter.
15114
15115 2018-01-05  Pedro Alves  <palves@redhat.com>
15116
15117         PR gdb/22670
15118         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15119         ada_lookup_symbol.
15120         (ada_lookup_symbol): Reimplement in terms of
15121         ada_lookup_symbol_list, bits factored out from
15122         ada_lookup_encoded_symbol.
15123
15124 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15125
15126         * ada-exp.y (write_object_renaming): When subscripting an array
15127         using a symbol as the index, pass the block in call to
15128         ada_lookup_encoded_symbol when looking that symbol up.
15129
15130 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15131
15132         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15133         TYPE_INDEX_TYPE.
15134
15135 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15136
15137         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15138         the case where VALUE_LVAL (val0) is not lval_memory.
15139
15140 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15141
15142         * ada-valprint.c (print_optional_low_bound): Handle
15143         character-indexed array printing like boolean-indexed array
15144         printing.
15145
15146 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15147
15148         * NEWS: Create a new section for the next release branch.
15149         Rename the section of the current branch, now that it has
15150         been cut.
15151
15152 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15153
15154         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15155         * version.in: Bump version to 8.1.50.DATE-git.
15156
15157 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15158
15159         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15160         Add field.
15161         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15162         Add field.
15163         (default_exception_support_info) <catch_handlers_sym>: Add field.
15164         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15165         (ada_exception_name_addr_1): Add "catch handlers" handling.
15166         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15167         Update all callers.
15168         (create_excep_cond_exprs) <ex>: Add parameter.
15169         (re_set_exception): Update create_excep_cond_exprs call.
15170         (print_it_exception, print_one_exception, print_mention_exception)
15171         (print_recreate_exception): Add "catch handler" handling.
15172         (allocate_location_catch_handlers, re_set_catch_handlers)
15173         (check_status_catch_handlers, print_it_catch_handlers)
15174         (print_one_catch_handlers, print_mention_catch_handlers)
15175         (print_recreate_catch_handlers): New function.
15176         (catch_handlers_breakpoint_ops): New variable.
15177         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15178         Add parameter.  Add "catch handler" handling.
15179         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15180         Add "catch handler" handling.
15181         (ada_exception_catchpoint_cond_string): Add "catch handler"
15182         handling.
15183         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15184         call.
15185         (catch_ada_handlers_command): New function.
15186         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15187         operations structure.
15188         (_initialize_ada_language): Add "catch handlers" command entry.
15189         * NEWS: Document "catch handlers" feature.
15190
15191 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15192
15193         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15194         account when creating the array type of the slice.
15195         (ada_value_slice): Likewise.
15196
15197 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15198
15199         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15200         New enum value.
15201         (create_array_type_with_stride): Add byte_stride_prop parameter.
15202         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15203         New parameter.  Update all callers in this file.
15204         (array_type_has_dynamic_stride): New function.
15205         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15206         of arrays with dynamic byte strides.
15207         * dwarf2read.c (read_array_type): Add support for dynamic
15208         DW_AT_byte_stride attributes.
15209
15210 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15211
15212         * dwarf2read.c (read_unspecified_type): Treat
15213         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15214
15215 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15216
15217         Update copyright year range in all GDB files.
15218
15219 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15220
15221         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15222         and gdb/testsuite/gdb.base/step-line.c.
15223
15224 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15225
15226         * copyright.py (main): Dump the contents of
15227         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15228         even if BY_HAND is empty.
15229
15230 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15231
15232         * top.c (print_gdb_version): Update Copyright year in version
15233         message.
15234
15235 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15236
15237         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15238
15239 For older changes see ChangeLog-2017.
15240 \f
15241 Local Variables:
15242 mode: change-log
15243 left-margin: 8
15244 fill-column: 74
15245 version-control: never
15246 coding: utf-8
15247 End: